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

From Tom Lane
Subject Re: Getting ERROR "subplan "SubPlan 1" was not initialized" in EXISTS subplan when using for list partition.
Date
Msg-id 983045.1631718053@sss.pgh.pa.us
Whole thread Raw
In response to Re: Getting ERROR "subplan "SubPlan 1" was not initialized" in EXISTS subplan when using for list partition.  (Ranier Vilela <ranier.vf@gmail.com>)
Responses Re: Getting ERROR "subplan "SubPlan 1" was not initialized" in EXISTS subplan when using for list partition.  (Ranier Vilela <ranier.vf@gmail.com>)
Re: Getting ERROR "subplan "SubPlan 1" was not initialized" in EXISTS subplan when using for list partition.  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
Ranier Vilela <ranier.vf@gmail.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



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Hook for extensible parsing.
Next
From: Andrew Dunstan
Date:
Subject: Re: EXPLAIN(VERBOSE) to CTE with SEARCH BREADTH FIRST fails