Re: Getting ERROR "subplan "SubPlan 1" was not initialized" in EXISTS subplan when using for list partition.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: Zhihong Yu <zyu(at)yugabyte(dot)com>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Getting ERROR "subplan "SubPlan 1" was not initialized" in EXISTS subplan when using for list partition.
Date: 2021-09-15 15:00:53
Message-ID: 983045.1631718053@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> writes:
> I would like to ask if this alternative fix (attached) would also solve the
> problem or not.

If I'm reading the patch correctly, that fixes it by failing to drop
unused subplans at all --- the second loop you have has no external
effect.

We could, in fact, not bother with removing the no-longer-referenced
subplans, and it probably wouldn't be all that awful. But the intent
of the original patch was to save the executor startup time for such
subplans, so I wanted to preserve that goal if I could. The committed
patch seems small enough and cheap enough to be worthwhile.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2021-09-15 15:05:02 Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails
Previous Message David Fetter 2021-09-15 14:58:23 Re: Hook for extensible parsing.