title: Why does Drop Index require commit?
body: <p>In my multi-threaded program, one thread drops indexes on a table (this happens first), and other threads insert records in the same table. It so happened that when dropping index is attempted, the table gets locked and the insert transactions become <em>"waiting"</em>.</p>
  
  <p>After wasting a lot of time on non-solutions to the problem, I found the real solution is to <strong>commit</strong> immediately after dropping the index. When <strong>commit</strong> is issued, the table is unlocked and the insert transactions complete successfully.</p>
  
  <p>My question is, <strong>why?</strong> I was under the impression that Drop Index is a DDL statement and therefore does not need to be committed. Postgres seems to prove me wrong.</p>