pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: hackerzheng666@gmail.com
Cc: pgsql-bugs@lists.postgresql.org, Robert Haas <robertmhaas@gmail.com>
Subject: Re: BUG #19924: unrecognized node type in create_plan_recurse: UNION, LIMIT, json_populate_recordset, inheritance
Date: Fri, 20 Nov 2026 15:53:05 -0500
Message-ID: <1713251.1795207985@sss.pgh.pa.us> (raw)
In-Reply-To: <19924-8aecd924385fafcc@postgresql.org>
References: <19924-8aecd924385fafcc@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> A UNION (with duplicate elimination) of two identical queries, each with
> json_populate_recordset() in the select list over a join that involves a
> table with an inheritance child, together with a LIMIT, fails in the planner
> with an internal error whose node tag is a garbage number.

Yeah, that's pretty clearly a pfree'd Path node.  I tried
git-bisecting this, and got an unhelpful-looking result:

8300d3ad4aa73dc6beec8dca7d9362dbc21c9a83 is the first bad commit
commit 8300d3ad4aa73dc6beec8dca7d9362dbc21c9a83 (HEAD)
Author: Robert Haas <rhaas@postgresql.org>
Date:   Mon Mar 9 08:16:30 2026 -0400

    Consider startup cost as a figure of merit for partial paths.

I suspect what this is telling us is that the bug predates that,
but by chance this example didn't fail earlier because our cost
heuristics didn't lead us to choose the broken path.

Valgrind doesn't find anything useful either: it is able to
report use of an uninitialized value, but it doesn't track
where the lost Path was allocated or freed.

Not sure about a productive way to narrow this down :-(

			regards, tom lane






view thread (6+ messages)  latest in thread

Message-ID: <1713251.1795207985@sss.pgh.pa.us>
Permalink:  ../1713251.1795207985@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1713251.1795207985@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, hackerzheng666@gmail.com, robertmhaas@gmail.com
  Subject: Re: BUG #19924: unrecognized node type in create_plan_recurse: UNION, LIMIT, json_populate_recordset, inheritance
  In-Reply-To: <1713251.1795207985@sss.pgh.pa.us>
  References: <19924-8aecd924385fafcc@postgresql.org> <1713251.1795207985@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox