v12: ERROR: subplan "InitPlan 2 (returns $4)" was not initialized
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: pgsql-hackers@postgresql.org
Cc: David Rowley <dgrowleyml@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2023-04-11T14:25:44Z
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
Commits
-
Fix parallel-safety marking when moving initplans to another node.
- 88ceac5d77f4 16.0 landed
- f4badbcf4540 15.3 landed
- 96c698e3ff8b 13.11 landed
- 953ff99c20c5 12.15 landed
- 60c8aeaf6745 11.20 landed
- 0dd55ef9b895 14.8 landed
-
Guard against core dump from uninitialized subplan.
- 55416b26a98f 12.5 cited
-
Mark a query's topmost Paths parallel-unsafe if they will have initPlans.
- ab77a5a4561f 10.0 cited