Re: pg_plan_advice - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_plan_advice
Date
Msg-id 1074589.1773873834@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_plan_advice  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pg_plan_advice
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Mar 18, 2026 at 6:26 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Ah ... so the observed behavior is because if pt2 does get replanned,
>> that happens with a different always_store_advice_details setting
>> than it used originally?

> Close, but not quite. always_store_advice_details is set for the
> even-numbered tests, so it's the same for pt2 and pt4. But
> pg_plan_advice.advice is empty for the the first half of the file and
> set for the second half of the file, so it's empty when pt2 is
> prepared and contains SEQ_SCAN(ptab) when pt4 is prepared. That
> accounts for the difference. avocet is actually doing the right thing,
> and the rest of the buildfarm is doing the wrong thing for lack of
> replanning.

Well, avocet is producing the output you want, but I think the rest
are behaving correctly given the way the script is written.

Anyway, I confirm that the patched output is stable with
debug_discard_caches = 1, so LGTM.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: remove bits* types
Next
From: Daniel Gustafsson
Date:
Subject: Re: Serverside SNI support in libpq