Re: pg_plan_advice

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_plan_advice
Date: 2026-03-18 22:43:54
Message-ID: 1074589.1773873834@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Wed, Mar 18, 2026 at 6:26 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2026-03-18 22:51:00 Re: Serverside SNI support in libpq
Previous Message Tom Lane 2026-03-18 22:41:20 Re: remove bits* types