public inbox for [email protected]
help / color / mirror / Atom feedFrom: Justin Pryzby <[email protected]>
To: Michael Paquier <[email protected]>
Cc: Soumyadeep Chakraborty <[email protected]>
Cc: Zhihong Yu <[email protected]>
Cc: [email protected]
Cc: Ashwin Agrawal <[email protected]>
Cc: [email protected]
Subject: Re: ALTER TABLE SET ACCESS METHOD on partitioned tables
Date: Sun, 16 Jul 2023 21:37:28 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<ZCJuW3GOfE/[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On Thu, Jun 01, 2023 at 08:50:50AM -0400, Michael Paquier wrote:
> >> Speaking of which, ATExecSetAccessMethodNoStorage() does a catalog
> >> update even if ALTER TABLE is defined to use the same table AM as what
> >> is currently set. There is no need to update the relation's pg_class
> >> entry in this case. Be careful that InvokeObjectPostAlterHook() still
> >> needs to be checked in this case. Perhaps some tests should be added
> >> in test_oat_hooks.sql? It would be tempted to add a new SQL file for
> >> that.
> >
> > Are you suggesting to put this in a conditional: if oldrelam!=newAccessMethod ?
>
> Yes, that's what I would add with a few lines close to the beginning
> of ATExecSetTableSpaceNoStorage() to save from catalog updates if
> these are not needed.
I understand that it's possible for it to be conditional, but I don't
undertand why it's desirable/important ?
It still seems preferable to be unconditional.
On Wed, May 31, 2023 at 06:35:34PM -0500, Justin Pryzby wrote:
>> Why is that desirable ? I'd prefer to see it written with fewer
>> conditionals, not more; then, it hits the same path every time.
It's not conditional in the tablespace code that this follows, nor
others like ATExecSetStatistics(), ATExecForceNoForceRowSecurity(),
ATExecSetCompression(), etc, some of which are recently-added. If it's
important to do here, isn't it also important to do everywhere else ?
--
Justin
view thread (32+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: ALTER TABLE SET ACCESS METHOD on partitioned tables
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox