Re: Heap lock levels for REINDEX INDEX CONCURRENTLY not quite right? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Heap lock levels for REINDEX INDEX CONCURRENTLY not quite right?
Date
Msg-id 31d2cf8b-0d76-dd01-5e4e-d2280951ba70@2ndquadrant.com
Whole thread Raw
In response to Re: Heap lock levels for REINDEX INDEX CONCURRENTLY not quite right?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: Heap lock levels for REINDEX INDEX CONCURRENTLY not quite right?  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 2019-05-02 10:44, Peter Eisentraut wrote:
>> so there's a lock upgrade hazard.
> Confirmed.

Here is a patch along the lines of your sketch.  I cleaned up the
variable naming a bit too.

REINDEX CONCURRENTLY is still deadlock prone because of
WaitForOlderSnapshots(), so this doesn't actually fix your test case,
but that seems unrelated to this particular issue.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Heap lock levels for REINDEX INDEX CONCURRENTLY not quite right?
Next
From: Rafia Sabih
Date:
Subject: Re: [PATCH v1] Show whether tables are logged in \dt+