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

2023-04-12 Thread David Rowley
On Thu, 13 Apr 2023 at 00:34, Tom Lane wrote: > Thanks for looking at this. After sleeping on it, I'm inclined > to use the v1 patch in the back branches and do the cost fixups > only in HEAD. I'm also fine with v1 for the back branches. David

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

2023-04-12 Thread Tom Lane
Richard Guo writes: > On Wed, Apr 12, 2023 at 3:59 AM Tom Lane wrote: >> The v1 patch attached is enough to fix the immediate issue, >> but there's another thing not to like, which is that we're also >> discarding the costs associated with the initplans. That's >> strictly cosmetic given that

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

2023-04-12 Thread Richard Guo
On Wed, Apr 12, 2023 at 3:59 AM Tom Lane wrote: > The v1 patch attached is enough to fix the immediate issue, > but there's another thing not to like, which is that we're also > discarding the costs associated with the initplans. That's > strictly cosmetic given that all the planning decisions

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

2023-04-11 Thread Tom Lane
Justin Pryzby writes: > 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 ( >

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

2023-04-11 Thread Justin Pryzby
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