Re: pg_*_advice: tsv load failure, etc.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Nikolay Samokhvalov <nik(at)postgres(dot)ai>
Cc: Noah Misch <noah(at)leadboat(dot)com>, pgsql-hackers(at)postgresql(dot)org, rmt(at)lists(dot)postgresql(dot)org
Subject: Re: pg_*_advice: tsv load failure, etc.
Date: 2026-10-05 20:33:35
Message-ID: CA+TgmoYYHC4i-Gpzc9-JYHqih6pOK+6LTYFiNR-PioXG1nKkOQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 5, 2026 at 1:01 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On top of all that, I'm still looking into one more problem discovered
> along the way as well, but I'm not ready to write about that, yet.

Here's v7, adding one more patch to fix the "one more problem"
mentioned, inserted into the sequences as 0003. Note that this breaks
ABI compatibility, but I nevertheless plan to back-patch to v19. cc:
rmt, in case they wish to weigh in.

0001-0003 all fix related deficiencies in child_append_relid_sets
handling. 0001 fixes the failure to fix up the RTIs stored in that
field at setrefs time; 0002 fixes pg_plan_advice's failure to set the
scan type properly for scans derived from child_append_relid_sets;
0003 fixes loss of child_append_relid_sets when (Merge)Append nodes
bearing them are subsequently elided. All of these solve problems
related to plan advice and partitioning, especially multi-level
partitioning, which I appear to have significantly under-tested. 0004
is unrelated to child_append_relid_sets, but still related to
partitioning: NO_GATHER can be left out of plan advice where it's
actually needed. And 0005 still fixes
JOIN_ORDER((whole_group_multiply_delimited)) scenarios.

Sorry for all the mistakes. :-(

--
Robert Haas
Databricks

Attachment Content-Type Size
v7-0001-Fix-failure-of-setrefs.c-to-process-child_append_.patch application/octet-stream 8.1 KB
v7-0002-pg_plan_advice-Avoid-miscategorizing-partitionwis.patch application/octet-stream 6.8 KB
v7-0004-pg_plan_advice-Don-t-suppress-NO_GATHER-advice-fo.patch application/octet-stream 16.5 KB
v7-0003-Add-child_append_relid_sets-to-ElidedNode-use-in-.patch application/octet-stream 9.5 KB
v7-0005-pg_plan_advice-Fix-advice-feedback-JOIN_ORDER-ove.patch application/octet-stream 5.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2026-10-05 21:05:43 Re: [PG19] COPY (query) TO ... (FORMAT json) uses the table's column names
Previous Message Harrison Booth 2026-10-05 20:25:46 Re: [PATCH v1] Fix races in Windows pthread emulation