Re: ALTER tbl rewrite loses CLUSTER ON index
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Amit Langote <amitlangote09@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org, Justin Pryzby <pryzby@telsasoft.com>
Date: 2020-03-18T02:48:37Z
Lists: pgsql-hackers
On Tue, Mar 17, 2020 at 11:20:44AM -0500, Justin Pryzby wrote: > On Tue, Mar 17, 2020 at 02:33:32PM +0900, Michael Paquier wrote: >> Patch 0002 from Justin does that, I would keep this refactoring as >> HEAD-only material though, and I don't spot any other code paths in >> need of patching. >> >> The commit message of patch 0001 is not what you wanted I guess. > > That's what git-am does, and I didn't find any option to make it less > unreadable. I guess I should just delete the email body it inserts. Strange... Anyway, Tom, Alvaro, are you planning to look at what is proposed on this thread? I don't want to step on your toes if that's the case and it seems to me that the approach taken by the patch is sound, using as basic fix the addition of an AT_ClusterOn sub-command to the list of commands to execute when rebuilding the table, ensuring that any follow-up CLUSTER command will use the correct index. -- Michael
Commits
-
Refactor cluster.c to use new routine get_index_isclustered()
- 8ef9451f58ee 13.0 landed
-
Preserve clustered index after rewrites with ALTER TABLE
- 3f77a670241d 9.5.22 landed
- 61a161fe4421 9.6.18 landed
- cef2b8d52c59 10.13 landed
- 41faafbd75a5 11.8 landed
- 3e62dd3a937b 12.3 landed
- a40caf5f862c 13.0 landed
-
Preserve replica identity index across ALTER TABLE rewrite
- 1cc9c2412cc9 13.0 cited
-
Remove RangeIOData->typiofunc
- a77315fdf2a1 13.0 cited
-
Preserve pg_index.indisclustered across REINDEX CONCURRENTLY
- f087d63a45b5 12.3 landed
- d79fb88ac738 13.0 landed