From: Jeff Davis <pgsql@j-davis.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: vignesh C <vignesh21@gmail.com>
Cc: pgsql-hackers@postgresql.org, Jacob Champion <pchampion@vmware.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Ashwin Agrawal <aagrawal@pivotal.io>
Cc: Ashutosh Sharma <ashu.coek88@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Subject: Re: alter table set TABLE ACCESS METHOD
Date: Fri, 30 Jul 2021 14:18:02 -0700
Message-ID: <87ca2262da500df70f12bb33e992197a0c903094.camel@j-davis.com> (raw)
In-Reply-To: <YQOoq17l7qvTBg1g@paquier.xyz>
References: <20210716034923.GL20208@telsasoft.com>
<CALDaNm1f_6DoFycXBVu6fEKeWjm3Xf3gSM5TDp13tiMY3zpThw@mail.gmail.com>
<20210722094154.GD19620@telsasoft.com>
<YP+4CEOMofngeDJi@paquier.xyz>
<YQDNwJp3amIJKizD@paquier.xyz>
<10785e3e9456a5d761164d3e60d9c4981b80e321.camel@j-davis.com>
<YQDk8UNge1b8dJXA@paquier.xyz>
<bfad9843733672c468783532fd440731aceb1f8f.camel@j-davis.com>
<YQJKV29/1a60uG68@paquier.xyz>
<d6a66a0ab44b43e416ee95aeab32d6b8afab8d0a.camel@j-davis.com>
<YQOoq17l7qvTBg1g@paquier.xyz>
On Fri, 2021-07-30 at 16:22 +0900, Michael Paquier wrote:
> Looking at the past, it was the intention of 05f3f9c7 to go through
> the hook even if SET TABLESPACE does not move the relation, so you
> are
> right that ALTER TABLE is inconsistent to not do the same for LOGGED,
> UNLOGGED and ACCESS METHOD if all of them do nothing to trigger a
> relation rewrite.
>
> Now, I am a bit biased about this change and if we actually need it
> for the no-op path. If we were to do that, I think that we need to
> add in AlteredTableInfo a way to track down if any of those
> subcommands have been used to allow the case of rewrite == 0 to
> launch
> the hook even if these are no-ops. And I am not sure if that's worth
> the code complication for an edge case. We definitely should have a
> hook call for the case of rewrite > 0, though.
It sounds like anything we do here should be part of a larger change to
make it consistent. So I'm fine with the patch you posted.
Regards,
Jeff Davis
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: pgsql-hackers@postgresql.org
Cc: pgsql@j-davis.com, michael@paquier.xyz, pryzby@telsasoft.com, vignesh21@gmail.com, pchampion@vmware.com, hlinnaka@iki.fi, aagrawal@pivotal.io, ashu.coek88@gmail.com, andres@anarazel.de, robertmhaas@gmail.com, amit.kapila16@gmail.com, alvherre@alvh.no-ip.org, dilipbalaut@gmail.com
Subject: Re: alter table set TABLE ACCESS METHOD
In-Reply-To: <87ca2262da500df70f12bb33e992197a0c903094.camel@j-davis.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox