| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: pg_plan_advice |
| Date: | 2026-03-24 20:47:12 |
| Message-ID: | CA+TgmoaZtZQ7o_e7XP=8TDuqaF-c7tHE0bFT3Hsqu7+RAA_Hug@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Mar 19, 2026 at 4:38 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> skink has a failure that looks like this:
>
> +WARNING: supplied plan advice was not enforced
> +DETAIL: advice NESTED_LOOP_MEMOIZE(nt) feedback is "matched, failed"
>
> I think this is caused by a minor bug in the pgs_mask infrastructure.
> get_memoize_path() exits quickly when outer_path->parent->rows < 2, on
> the theory that the resulting path must lose on cost. But that
> presumes that we could do a plain nested loop instead, i.e. that
> PGS_NESTLOOP_PLAIN is set. And it might not be. Before the pgs_mask
> stuff, that case couldn't happen: enable_nestloop=off disabled all
> nested loops, and enable_memoize=off disabled only the memoized
> version, but there wasn't any way to disable only the non-memoized
> version (which, of course, was part of the point of the whole thing).
> I think the fix is as attached.
The new test in that version was exactly backwards. I have corrected
that issue and committed this.
--
Robert Haas
EDB: http://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2026-03-24 20:53:10 | Re: [PATCH] Fix wrong argument to SOFT_ERROR_OCCURRED in timestamptz_date |
| Previous Message | Cliff Clark | 2026-03-24 20:38:21 | [PATCH] Auto vacuum should still run when clock is set back |