Deadlock in multiple CIC.

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Deadlock in multiple CIC.
Date: 2017-12-26 05:31:02
Message-ID: CAMkU=1ztk3TpQdcUNbxq93pc80FrXUjpDWLGMeVBDx71GHNwZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

c3d09b3bd23f5f6 fixed it so concurrent CIC would not deadlock (or at least
not as reliably as before) by dropping its own snapshot before waiting for
all the other ones to go away.

With commit 8aa3e47510b969354ea02a, concurrent CREATE INDEX CONCURRENTLY on
different tables in the same database started deadlocking against each
other again quite reliably.

I think the solution is simply to drop the catalog snapshot as well, as in
the attached.

reported by Jeremy Finzel here:
https://www.postgresql.org/message-id/flat/CAMa1XUhHjCv8Qkx0WOr1Mpm_R4qxN26EibwCrj0Oor2YBUFUTg%40mail(dot)gmail(dot)com#CAMa1XUhHjCv8Qkx0WOr1Mpm_R4qxN26EibwCrj0Oor2YBUFUTg(at)mail(dot)gmail(dot)com

Cheers,

Jeff

Attachment Content-Type Size
CIC_deadlock.patch text/x-patch 417 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lelisa Diriba 2017-12-26 07:23:46 Ethiopian calendar year(DATE TYPE) are different from the Gregorian calendar year
Previous Message Michael Paquier 2017-12-26 04:55:03 Getting rid of "tuple concurrently updated" elog()s with concurrent DDLs (at least ALTER TABLE)