Re: ALTER TABLE: warn when actions do not recurse to partitions - Mailing list pgsql-hackers

From Greg Sabino Mullane
Subject Re: ALTER TABLE: warn when actions do not recurse to partitions
Date
Msg-id CAKAnmmLWdEvFR+-+5HXzMEnd8fLfyvkK4QxtSHMBhoXC5Qvcug@mail.gmail.com
Whole thread Raw
In response to Re: ALTER TABLE: warn when actions do not recurse to partitions  (Chao Li <li.evan.chao@gmail.com>)
Responses Re: ALTER TABLE: warn when actions do not recurse to partitions
List pgsql-hackers
On Wed, Mar 11, 2026 at 3:05 AM Chao Li <li.evan.chao@gmail.com> wrote:
Are you concerning that rendering the full message text is the extra work? This is not a hot path, so I don’t think that would be a big deal. Actually, adding two more fields sounds more expensive

Well, the recurring creation and freeing of the strings is the part that seems inefficient. But you don't even need to store the strings at all if you are tracking the action+rel. In such a case, the final strings can be created on the fly inside of EmitPartitionNoRecurseNotice, right? Then you just need a list to store the combos of action+relation.

Yes, as SET SCHEMA doesn’t go through the standard ALTER TABLE process: AlterTable() -> ATController() -> ATPrepCmd().

If you get some idea, please let me know.

Nothing worth the trouble, to be honest. As you rightly pointed out, this is not a hot path.


Cheers,
Greg

pgsql-hackers by date:

Previous
From: "Daniel Verite"
Date:
Subject: Re: Change initdb default to the builtin collation provider
Next
From: Robert Pang
Date:
Subject: [PATCH] Fix premature timeout in pg_promote() caused by signal interruptions