Re: alter table set TABLE ACCESS METHOD
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Jeff Davis <pgsql@j-davis.com>, pgsql-hackers@postgresql.org, Jacob Champion <pchampion@vmware.com>, Heikki Linnakangas <hlinnaka@iki.fi>, Ashwin Agrawal <aagrawal@pivotal.io>, Ashutosh Sharma <ashu.coek88@gmail.com>, Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Dilip Kumar <dilipbalaut@gmail.com>
Date: 2021-06-10T02:35:06Z
Lists: pgsql-hackers
On Wed, Jun 09, 2021 at 01:47:18PM +0900, Michael Paquier wrote: > On Tue, Jun 08, 2021 at 05:33:31PM -0700, Jeff Davis wrote: > > New version attached, with the detoasting code removed. Could use > > another round of validation/cleanup in case I missed something during > > the merge. > > This looks rather sane to me, thanks. > > /* Create the transient table that will receive the re-ordered data */ > OIDNewHeap = make_new_heap(tableOid, tableSpace, > + accessMethod > It strikes me that we could extend CLUSTER/VACUUM FULL to support this > option, in the same vein as TABLESPACE. Perhaps that's not something to > implement or have, just wanted to mention it. It's a good thought. But remember that that c5b28604 handled REINDEX (TABLESPACE) but not CLUSTER/VACUUM FULL (TABLESPACE). You wrote: https://www.postgresql.org/message-id/YBuWbzoW6W7AaMv0%40paquier.xyz > Regarding the VACUUM and CLUSTER cases, I am not completely sure if > going through these for a tablespace case is the best move we can do, > as ALTER TABLE is able to mix multiple operations and all of them > require already an AEL to work. REINDEX was different thanks to the > case of CONCURRENTLY. Anyway, as a lot of work has been done here > already, I would recommend to create new threads about those two > topics. I am also closing this patch in the CF app. In any case, I think we really want to have an ALTER .. SET ACCESS METHOD. Supporting it also in CLUSTER/VACUUM is an optional, additional feature. -- Justin
Commits
-
Allow specifying an access method for partitioned tables
- 374c7a229042 17.0 landed
-
Fix regression test output of sepgsql
- 1e3445237b86 15.0 landed
-
Add call to object access hook at the end of table rewrite in ALTER TABLE
- 7b565843a944 15.0 landed
-
Fix typo in tab-complete.c
- 15c6ede04577 15.0 landed
-
Add support for SET ACCESS METHOD in ALTER TABLE
- b0483263dda0 15.0 landed
-
tableam: introduce table AM infrastructure.
- 8586bf7ed888 12.0 cited