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

From Michael Paquier
Subject Re: Heap lock levels for REINDEX INDEX CONCURRENTLY not quite right?
Date
Msg-id 20190507234311.GA2223@paquier.xyz
Whole thread Raw
In response to Re: Heap lock levels for REINDEX INDEX CONCURRENTLY not quite right?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, May 07, 2019 at 06:45:36PM -0400, Tom Lane wrote:
> Yeah.  CREATE INDEX CONCURRENTLY has always had a deadlock hazard,
> so it's hardly surprising that REINDEX CONCURRENTLY does too.
> I don't think that fixing that is in-scope for v12, even if we had
> an idea how to do it, which we don't.

The most straight-forward approach I can think of would be to
determine if non-transactional commands taking a lock on a table can
be safely skipped or not when checking for older snapshots than the
minimum where the index is marked as valid.  That's quite complex to
target v12, so I agree to keep it out of the stability work.

> We do need to fix the wrong-lock-level problem of course, but
> that seems straightforward.

Sure.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Donald Dong
Date:
Subject: Why could GEQO produce plans with lower costs than thestandard_join_search?
Next
From: Tom Lane
Date:
Subject: Re: Why could GEQO produce plans with lower costs than the standard_join_search?