On 4/4/26 20:52, Lukas Fittl wrote:
> Hi Andrei,
> it seems to me this is caused by the join analysis tree walker in
> pgpa_join.c / pgpa_decompose_join being a bit too specific to what the
> core planner will produce, i.e. it only assumes Merge Joins will have
> Sort nodes directly underneath them.
My initial concern was about the design of the pg_plan_advice extension
in general. It seems flawed if it must follow the core plan-building
logic. Explore pg_hint_plan - their general concept is just to increase
the probability of a template subtree to maximum, not to assume that
some constructions are possible or not.
> Btw, is your extension available somewhere? That could help verify
> that the extension also works as expected with the fix.
This is the stage of core patch development. If the community rejects
the feature, I will convert it into an extension module (on request). -
It is too expensive to support each optimisation when you do it 'just
for fun'.
--
regards, Andrei Lepikhov,
pgEdge