From: | Richard Guo <guofenglinux(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers(at)postgresql(dot)org, David Rowley <dgrowleyml(at)gmail(dot)com> |
Subject: | Re: v12: ERROR: subplan "InitPlan 2 (returns $4)" was not initialized |
Date: | 2023-04-12 06:01:37 |
Message-ID: | CAMbWs4-GcB2sHtDqcJ8BY8mhm6j-4gyQxfuixChg=MjQErTbYA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Apr 12, 2023 at 3:59 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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 are
> already made, but it still seems potentially annoying if you're
> trying to understand EXPLAIN output. So I'm inclined to instead
> do something like v2 attached, which deals with that as well.
> (On the other hand, we aren't bothering to fix up costs when
> we move initplans around in materialize_finished_plan or
> standard_planner ... so maybe that should be left for a patch
> that fixes those things too.)
+1 to the v2 patch.
* Should we likewise set the parallel_safe flag for topmost plan in
SS_attach_initplans?
* In standard_planner around line 443, we move any initPlans from
top_plan to the new added Gather node. But since we know that the
top_plan is parallel_safe here, shouldn't it have no initPlans?
Thanks
Richard
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2023-04-12 07:11:41 | Re: [PATCH] Add `verify-system` sslmode to use system CA pool for server cert |
Previous Message | Thomas Munro | 2023-04-12 05:48:54 | Re: Direct I/O |