pgsql: Avoid deadlock between concurrent CREATE INDEX CONCURRENTLY comm

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid deadlock between concurrent CREATE INDEX CONCURRENTLY comm
Date: 2013-04-25 20:58:51
Message-ID: E1UVTFj-00079u-9C@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/8e85397638dbc7c91a3c18add9735fcbcb656684

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

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2013-04-26 13:01:13 pgsql: libpq: Fix a few bits that didn't get the memo about COPY BOTH.
Previous Message Heikki Linnakangas 2013-04-25 11:11:17 pgsql: Fix typo in comment.