From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Deadlock in multiple CIC.
Date: Tue, 2 Jan 2018 23:22:42 -0300
Message-ID: <20180103022242.yjyjcg2ndqwc6sss@alvherre.pgsql> (raw)
In-Reply-To: <CAMkU=1ztk3TpQdcUNbxq93pc80FrXUjpDWLGMeVBDx71GHNwZQ@mail.gmail.com>
Jeff Janes wrote:
> 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.
Pushed to all affected branches, along with a somewhat lame
isolationtester test for the condition (since we've already broken this
twice and not noticed for long).
Thanks for the diagnosis and patch,
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, jeff.janes@gmail.com
Subject: Re: Deadlock in multiple CIC.
In-Reply-To: <20180103022242.yjyjcg2ndqwc6sss@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox