Re: REINDEX CONCURRENTLY unexpectedly fails
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, Manuel Rigger <rigger.manuel@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2020-01-21T02:43:03Z
Lists: pgsql-bugs
Attachments
- reindex-conc-temp-v6.patch (text/x-diff) patch v6
On Mon, Jan 20, 2020 at 10:59:13AM +0900, Michael Paquier wrote: > Except for the part with index_drop() where I would rather do the > decision-making for the concurrent behavior in RemoveRelations() > rather than index_drop() (as I did in v4), what you have here looks > fine to me. Would you prefer wrapping up this stuff yourself or > should I? This needs a backpatch down to 9.4 for the CIC/DIC part. Same feeling after sleeping on it. I have worked more this morning on this stuff and I am finishing with the attached, which is a gathering of everything that has been discussed, and based on Heikki's v5: - Changed the part for DROP INDEX CONCURRENTLY to do the decision-making in RemoveRelations() at the earliest stage possible. - Removed the call to CheckTableNotInUse() in ReindexRelationConcurrently(). Let's use a separate patch/thread for that. - Found one typo in the docs of REINDEX. If there are no objections, I would like to wrap that in the next day or so (still need to do the work for the back-branches). -- Michael
Commits
-
Fix concurrent indexing operations with temporary tables
- d76652edc56f 9.4.26 landed
- c39f45598177 9.5.21 landed
- ef33edeb5835 9.6.17 landed
- 9055344b495f 10.12 landed
- 5b4b07fa9ac3 11.7 landed
- 817a1b88ac66 12.2 landed
- a904abe2e284 13.0 landed