| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Richard Guo <guofenglinux(at)gmail(dot)com> |
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, hackerzheng666(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com> |
| Subject: | Re: BUG #19924: unrecognized node type in create_plan_recurse: UNION, LIMIT, json_populate_recordset, inheritance |
| Date: | 2026-11-21 02:24:58 |
| Message-ID: | 1733308.1795227898@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> On Sat, Nov 21, 2026 at 7:48 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Ah, I identified the problem and a possible fix. The root culprit is
>> in grouping_planner():
> I haven't had a close look at this bug, but I feel that this is the
> same bug as [1], where Jeevan proposed the same parent check. His
> reproducer fails on v18 too, so it predates 8300d3ad4.
Ah, I'd lost track of that thread, but I think you're entirely right
that it's the same bug. The apparent branch-to-branch behavioral
variations are not related to the bug mechanism, but to changing
choices about which path to prefer. Notably, it seems like the
reason 8300d3ad4 made this example fail is precisely that it allowed
startup cost to be considered for partial paths, and thus changed
which partial paths survive the add_partial_path tournament ...
but not which Gather paths survive the add_path tournament.
I concur with the comments on the other thread that reference-counting
Paths, while it's the right thing in principle, is far too invasive
to be attractive (much less back-patchable). This parent-pointer
check idea is surely a hack by comparison, but if it solves all known
cases, let's do it.
I'm unsure that a regression test for this will actually be very
useful; all the known examples seem pretty narrow/brittle and
hence unlikely to be meaningful for more than a version or two.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2026-11-21 02:28:31 | Re: BUG #19881: CLUSTER uses a disabled sort path when enable_sort is off |
| Previous Message | Richard Guo | 2026-11-21 01:15:52 | Re: BUG #19924: unrecognized node type in create_plan_recurse: UNION, LIMIT, json_populate_recordset, inheritance |