Re: REINDEX CONCURRENTLY 2.0
Peter Eisentraut <peter_e@gmx.net>
From: Peter Eisentraut <peter_e@gmx.net>
To: Michael Paquier <michael.paquier@gmail.com>,
Andres Freund <andres@2ndquadrant.com>
Cc: Jim Nasby <jim@nasby.net>,
PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2014-11-06T14:50:58Z
Lists: 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.
Commits
-
Prevent reindex of invalid indexes on TOAST tables
- 8bca5f93547c 12.3 landed
- 61d7c7bce368 13.0 landed
-
Rework handling of invalid indexes with REINDEX CONCURRENTLY
- a6dcf9df4d91 12.0 landed
-
Split builtins.h to a new header ruleutils.h
- 7b1c2a0f2066 9.5.0 cited