v12: ERROR: subplan "InitPlan 2 (returns $4)" was not initialized

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: v12: ERROR: subplan "InitPlan 2 (returns $4)" was not initialized
Date: 2023-04-11 14:25:44
Message-ID: ZDVt6MaNWkRDO1LQ@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Reduced from sqlsmith, this query fails under debug_parallel_query=1.

The elog was added at: 55416b26a98fcf354af88cdd27fc2e045453b68a
But (I'm not sure) the faulty commit may be 8edd0e7946 (Suppress Append
and MergeAppend plan nodes that have a single child).

postgres=# SET force_parallel_mode =1; CREATE TABLE x (i int) PARTITION BY RANGE (i); CREATE TABLE x1 PARTITION OF x DEFAULT ;
select * from pg_class,
lateral (select pg_catalog.bit_and(1)
from pg_class as sample_1
where case when EXISTS (
select 1 from x
where EXISTS (
select 1 from pg_catalog.pg_depend
where (sample_1.reltuples is NULL)
)) then 1 end
is NULL)x
where false;

--
Justin

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2023-04-11 14:36:02 Various typo fixes
Previous Message Tom Lane 2023-04-11 14:12:54 Re: When to drop src/tools/msvc support