Re: alter table set TABLE ACCESS METHOD
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Justin Pryzby <pryzby@telsasoft.com>, vignesh C <vignesh21@gmail.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-07-29T15:55:21Z
Lists: pgsql-hackers
On Thu, 2021-07-29 at 15:27 +0900, Michael Paquier wrote: > Doing any checks around the hooks of objectaccess.h is very annoying, > because we have no modules to check after them easily except sepgsql. > Anyway, I have been checking that, with the hack-ish module attached > and tracked down that swap_relation_files() calls > InvokeObjectPostAlterHookArg() already (as you already spotted?), but > that's an internal change when it comes to SET LOGGED/UNLOGGED/ACCESS > METHOD :( > > Attached is a small module I have used for those tests, for > reference. It passes on HEAD, and with the patch attached you can > see > the extra entries. I see that ATExecSetTableSpace() also invokes the hook even for a no- op. Should we do the same thing for setting the AM? > > > > Also, I agree with Justin that it should fail when there are > > > > multiple > > > > SET ACCESS METHOD subcommands consistently, regardless of > > > > whether > > > > one > > > > is a no-op, and it should probably throw a syntax error to > > > > match > > > > SET > > > > TABLESPACE. > > > > > > Hmm. Okay. > > I'd still disagree with that. OK, I won't press for a change here. Regards, Jeff Davis
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