Re: ALTER tbl rewrite loses CLUSTER ON index
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Michael Paquier <michael@paquier.xyz>, Alvaro Herrera <alvherre@2ndquadrant.com>, pgsql-hackers@postgresql.org
Date: 2020-03-16T13:27:31Z
Lists: pgsql-hackers
Attachments
- v7-0001-ALTER-tbl-rewrite-loses-CLUSTER-ON-index.patch (text/x-diff)
On Mon, Mar 16, 2020 at 04:01:42PM +0900, Amit Langote wrote: > I came across a commit that recently went in: > > commit 1cc9c2412cc9a2fbe6a381170097d315fd40ccca > Author: Peter Eisentraut <peter@eisentraut.org> > Date: Fri Mar 13 11:28:11 2020 +0100 > > Preserve replica identity index across ALTER TABLE rewrite > > which fixes something very similar to what we are trying to with this > patch. The way it's done looks to me very close to what you are > telling. I have updated the patch to be similar to the above fix. Yes, I noticed it too. Should we use your get_index_isclustered more widely ? Also, should we call it "is_index_clustered", since otherwise it sounds alot like "+get_index_clustered" (without "is"), which sounds like it takes a table and returns which index is clustered. That might be just as useful for some of these callers. -- Justin
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