Re: REINDEX CONCURRENTLY 2.0 - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: REINDEX CONCURRENTLY 2.0
Date
Msg-id 545B8AD2.8030203@gmx.net
Whole thread Raw
In response to Re: REINDEX CONCURRENTLY 2.0  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: REINDEX CONCURRENTLY 2.0  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 10/1/14 3:00 AM, Michael Paquier wrote:
> - Use of AccessExclusiveLock when swapping relfilenodes of an index and
> its concurrent entry instead of ShareUpdateExclusiveLock for safety. At
> the limit of my understanding, that's the consensus reached until now.

I'm very curious about this point.  I looked through all the previous
discussions, and the only time I saw this mentioned was at the very
beginning when it was said that we could review the patch while ignoring
this issue and fix it later with MVCC catalog access.  Then it got very
technical, but it was never explicitly concluded whether it was possible
to fix this or not.

Also, in the thread "Concurrently option for reindexdb" you pointed out
that requiring an exclusive lock isn't really concurrent and proposed an
option like --minimum-locks.

I will point out again that we specifically invented DROP INDEX
CONCURRENTLY because holding an exclusive lock even briefly isn't good
enough.

If REINDEX cannot work without an exclusive lock, we should invent some
other qualifier, like WITH FEWER LOCKS.  It's still useful, but we
shouldn't give people the idea that they can throw away their custom
CREATE INDEX CONCURRENTLY + DROP INDEX CONCURRENTLY scripts.




pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Repeatable read and serializable transactions see data committed after tx start
Next
From: Tom Lane
Date:
Subject: Re: Repeatable read and serializable transactions see data committed after tx start