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