Re: plan shape work

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Richard Guo <guofenglinux(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: plan shape work
Date: 2025-12-08 19:06:35
Message-ID: CA+TgmobbScywJEXBn+jgTGmBHdWNTpUvjoCMkkdnVBfjpUHdLA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 1, 2025 at 3:31 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> So I'm wondering if we ought to step back and rethink a bit.
> subplanNames ensures that we assign a different name to every
> PlannerInfo, but it doesn't give you any help finding the PlannerInfo
> given the name, or enumerating all of the PlannerInfo objects that
> exist. If we went back to allroots, and just fixed the problem of
> temporary entries creeping into the list, the core code wouldn't
> really notice the difference, but I think extensions would have an
> easier time.
>
> Thoughts?

Here's a couple of patches to bring back allroots. The first one adds
allroots, makes choose_plan_name() use it, and adds assertions that
the contents of allroots and subplanNames correspond. The second one
removes subplanNames. I imagine that these would be collapsed for
commit, but testing 0001 without 0002 seems useful for peace of mind.

--
Robert Haas
EDB: http://www.enterprisedb.com

Attachment Content-Type Size
v1-0002-Remove-glob-subplanNames.patch application/octet-stream 2.5 KB
v1-0001-Add-a-list-of-all-PlannerInfo-roots-to-PlannerGlo.patch application/octet-stream 6.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2025-12-08 19:09:14 Re: [Proposal] Adding callback support for custom statistics kinds
Previous Message Masahiko Sawada 2025-12-08 18:51:23 Re: POC: enable logical decoding when wal_level = 'replica' without a server restart