]> 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:23 +0000 (16:58 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 25 Apr 2013 20:58:23 +0000 (16:58 -0400)
commit8e85397638dbc7c91a3c18add9735fcbcb656684
tree880fb5ba0630605d468d8cd051515ead61f0e7c4
parenteab46ee07fa317a8d374790def55726d9e414b88
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