pgsql: Avoid deadlock between concurrent CREATE INDEX CONCURRENTLY comm - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Avoid deadlock between concurrent CREATE INDEX CONCURRENTLY comm
Date
Msg-id E1UVTFj-00079r-7I@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/0dcff7560a2f6c70313447b948c35f94193bc656

Modified Files
--------------
src/backend/commands/indexcmds.c |   23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Avoid deadlock between concurrent CREATE INDEX CONCURRENTLY comm
Next
From: Tom Lane
Date:
Subject: pgsql: Avoid deadlock between concurrent CREATE INDEX CONCURRENTLY comm