| From: | Dongpo Liu <poe(dot)liu(at)pm(dot)me> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>, Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: pg_*_advice: tsv load failure, etc. |
| Date: | 2026-10-09 20:19:25 |
| Message-ID: | w902jLINSZUbE-ZNqh-lIlxII9qWchz4chRoXa3FR-HOMPEKovyrXLHvz-BgiyEstBLz8OY29o3U6pVFC42LJ6oAXuq-fTyCR4pi4HbGB30=@pm.me |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Robert,
Thanks for the rewrite. The v2 wording is clearer, and the patch looks good to me.
Best regards,
Dongpo Liu
On Friday, October 9th, 2026 at 9:15 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Sun, Oct 4, 2026 at 8:38 AM Dongpo Liu <poe(dot)liu(at)pm(dot)me> wrote:
> > The patch adds a paragraph to the Limitations section of pg_plan_advice
> > and a short pointer in pg_stash_advice. It says that advice is consulted
> > only at plan time, mentions DISCARD PLANS for the current session, and
> > refers to PREPARE for when other sessions re-plan.
>
> I think it's a good idea to add something to the documentation about
> this issue, but I'm not entirely convinced by this wording. In
> particular:
>
> "The new advice is used the next time the statement is planned" => To
> me, this sort of makes it seem like you could just leave
> pg_plan_advice.advice set the whole time, which is not a realistic
> approach. Or else as though it will remember the advice that it didn't
> use this time and use it next time re-planning actually happens, which
> it won't.
>
> "Plans cached by other sessions are re-planned only when something
> else invalidates them; see <xref linkend="sql-prepare"/>." => I feel
> like there are two ways to read this. One possible reading is that
> replanning doesn't happen on every use of the cache, but only when
> there is a reason to replan. That's just the definition of a cache.
> The other possible reading is that invalidation is the only thing that
> can trigger replanning, which isn't true;
> for example, the other session could have a custom plan, or it could
> execute DISCARD PLANS itself.
>
> Here's my rewrite. (Also, I committed my latest round of bug-fix patches.)
>
> --
> Robert Haas
> Databricks
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Heikki Linnakangas | 2026-10-09 20:52:32 | Re: [PATCH] Discard aborted updaters when expanding a multixact |
| Previous Message | Robert Haas | 2026-10-09 20:08:25 | Re: Bypassing cursors in postgres_fdw to enable parallel plans |