On Tuesday, March 3, 2026, Robert Haas <[email protected]> wrote:

>
> >
> > SEQ_SCAN(t1@minmax_1) /* matched, failed */
>
> Because there's not a way to control aggregation behavior at present,
> you can't directly conrol whether t1 or t1@minmax_1 appears in the
> winning plan.


Ok, that’s what I was missing here, it saw the subplan in its options but
the winning plan didn’t include it.  So “matched/failed” may produce a plan
where the target having been matched isn’t actually visible to the user.

Maybe add a note like this to pg_plan_advice:

Generated advice is produced to a high level of specificity without knowing
what limitations the advice interpreter has in applying that advice.
Therefore, generated advice targets may later fail for no other reason than
cost-based decisions resulted in the originally chosen plan to no longer be
chosen.  The planner will still likely see the original target on a now
losing plan and thus the advice feedback will report matched even when the
winning plan does not include the specific target.

David J.

Reply via email to