From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Rearranging ALTER TABLE to avoid multi-operations bugs
Date: Wed, 29 May 2019 17:52:02 -0400
Message-ID: <41500.1559166722@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+Tgmoa3FzZvWriJmqquvAbf8GxrC9YM9umBb18j5M69iuq9bg@mail.gmail.com>
References: <10365.1558909428@sss.pgh.pa.us>
<CA+Tgmoa3FzZvWriJmqquvAbf8GxrC9YM9umBb18j5M69iuq9bg@mail.gmail.com>
Robert Haas <robertmhaas@gmail.com> writes:
> On Sun, May 26, 2019 at 6:24 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Anybody have thoughts about a different way to approach it?
> I mean, in an ideal world, I think we'd never call back out to
> ProcessUtility() from within AlterTable(). That seems like a pretty
> clear layering violation. I assume the reason we've never tried to do
> better is a lack of round tuits and/or sufficient motivation.
> In terms of what we'd do instead, I suppose we'd try to move as much
> as possible inside the ALTER TABLE framework proper and have
> everything call into that.
Hm ... I'm not exactly clear on why that would be a superior solution.
It would imply that standalone CREATE INDEX etc would call into the
ALTER TABLE framework --- how is that not equally a layering violation?
Also, recursive ProcessUtility cases exist independently of this issue,
in particular in CreateSchemaCommand. My worry about my patch upthread
is not really that it introduces another one, but that it doesn't do
anything towards providing a uniform framework/notation for all these
cases.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com
Subject: Re: Rearranging ALTER TABLE to avoid multi-operations bugs
In-Reply-To: <41500.1559166722@sss.pgh.pa.us>
References: <10365.1558909428@sss.pgh.pa.us> <CA+Tgmoa3FzZvWriJmqquvAbf8GxrC9YM9umBb18j5M69iuq9bg@mail.gmail.com> <41500.1559166722@sss.pgh.pa.us>
* 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