]> granicus.if.org Git - postgresql/commit
Avoid deadlock between concurrent CREATE INDEX CONCURRENTLY commands.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 25 Apr 2013 20:58:14 +0000 (16:58 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 25 Apr 2013 20:58:14 +0000 (16:58 -0400)
commit32ad1d696a0e7b50074d57b25708ffd1dc82600f
treef5a971f7eb70889f773bb909af91e660a586eba4
parentae76795214437f042151906d7f6f000382c2291c
Avoid deadlock between concurrent CREATE INDEX CONCURRENTLY commands.

There was a high probability of two or more concurrent C.I.C. commands
deadlocking just before completion, because each would wait for the others
to release their reference snapshots.  Fix by releasing the snapshot
before waiting for other snapshots to go away.

Per report from Paul Hinze.  Back-patch to all active branches.
src/backend/commands/indexcmds.c