Re: v12.0: reindex CONCURRENTLY: lock ShareUpdateExclusiveLock on object 14185/39327/0 is already held
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@lists.postgresql.org, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Andreas Karlsson <andreas@proxel.se>
Date: 2019-10-23T10:18:33Z
Lists: pgsql-hackers
On Sat, Oct 19, 2019 at 11:41:06AM +0900, Michael Paquier wrote: > FWIW, I have spent an hour or two poking at this issue the last couple > of days so I am not ignoring both, not as much as I would have liked > but well... My initial lookup leads me to think that something is > going wrong with the cleanup of the session-level lock on the parent > table taken in the first transaction doing the REINDEX CONCURRENTLY. I can confirm that this is an issue related to session locks which are not cleaned up when in an out-of-transaction state, state that can be reached between a transaction commit or start while holding at least one session lock within one single command of VACUUM, CIC or REINDEX CONCURRENTLY. The failure is actually pretty easy to reproduce if you add an elog(ERROR) after a CommitTransactionCommand() call and then shut down the connection. I am starting a new thread about that. The problem is larger than it looks, and exists for a long time. -- Michael
Commits
-
Fix handling of pg_class.relispartition at swap phase in REINDEX CONCURRENTLY
- eae1ba65fab4 12.1 landed
- d80be6f2f6c9 13.0 landed
-
Handle interrupts within a transaction context in REINDEX CONCURRENTLY
- 7f84b0ef0bfb 12.1 landed
- 8270a0d9a948 13.0 landed