Re: pg_plan_advice - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pg_plan_advice
Date
Msg-id CA+Tgmob-69bzbdi3U_QtebqAf6u1y8js=5=oNK639csVe1VbhA@mail.gmail.com
Whole thread Raw
In response to Re: pg_plan_advice  (Lukas Fittl <lukas@fittl.com>)
List pgsql-hackers
On Sun, Jan 11, 2026 at 3:21 PM Lukas Fittl <lukas@fittl.com> wrote:
> I wonder a bit if we shouldn't instead focus on this being about the
> inputs to create_append_path (and the 4 different variants of calling
> it in add_paths_to_append_rel), and make sure we group some of them
> together in a struct, but still pass the individual fields of that
> struct to accumulate_append_subpaths.
>
> I've sketched out what I mean in the attached

This is a good idea, IMHO. It didn't compile and I made some other
cosmetic fixes, but I like the direction.

Here's v9. Changes:

* Updated all patches with reviewers to date and discussion link. I
have listed the same reviewers for all of 0001-0004, but the list for
0005 is different, based on my reading of the emails on this thread.
If someone feels that I've made the wrong choices about listing them,
please let me know.
* Incorporated Lukas's idea into 0003 and listed him as a co-author.
* Some comment improvements to 0004.

In 0005:

* Disallow JOIN_ORDER() without targets, per feedback from Ajay Pal.
* pgindent
* Incorporate the fix to pgpa_process_unrolled_join() that I
previously posted separately, and update the associated comments.

I now feel that I've had enough substantial feedback on 0003 and 0004
that it wouldn't be crazy to think about committing those, unless
further review turns up problems or something. I think I need more
substantial review on 0001 and 0002 before I could consider moving
forward with those. And 0005 needs a lot more review, and also a lot
more work from my side. Given that, where do I go from here? I don't
think it makes sense to commit 0002 or 0003 without 0001, but 0004 is
mostly independent of 0001-0003. So, I think that if more feedback on
0001 and 0002 is forthcoming soon, I'll probably just wait a bit and
hope to commit 0001-0004 in the current order. If not, I'll rearrange
the series to move 0004 to the front, and plan to commit that first.

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

Attachment

pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions
Next
From: Álvaro Herrera
Date:
Subject: Re: [PATCH} Move instrumentation structs