Fix table lock levels for REINDEX INDEX CONCURRENTLY
Peter Eisentraut <peter@eisentraut.org>
Fix table lock levels for REINDEX INDEX CONCURRENTLY REINDEX CONCURRENTLY locks tables with ShareUpdateExclusiveLock rather than the ShareLock used by a plain REINDEX. However, RangeVarCallbackForReindexIndex() was not updated for that and still used the ShareLock only. This would lead to lock upgrades later, leading to possible deadlocks. Reported-by: Andres Freund <andres@anarazel.de> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/flat/20190430151735.wi52sxjvxsjvaxxt%40alap3.anarazel.de
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/indexcmds.c | modified | +33 −12 |
Discussion
- Heap lock levels for REINDEX INDEX CONCURRENTLY not quite right? 15 messages · 2019-04-30 → 2019-05-08