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

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Richard Guo <guofenglinux@gmail.com>, Justin Pryzby <pryzby@telsasoft.com>, pgsql-hackers@postgresql.org
Date: 2023-04-12T21:36:01Z
Lists: pgsql-hackers
On Thu, 13 Apr 2023 at 00:34, Tom Lane <tgl@sss.pgh.pa.us> 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



Commits

  1. Fix parallel-safety marking when moving initplans to another node.

  2. Guard against core dump from uninitialized subplan.

  3. Mark a query's topmost Paths parallel-unsafe if they will have initPlans.