Re: generic plans and "initial" pruning - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: generic plans and "initial" pruning
Date
Msg-id 9D23D8BB-83EE-451E-95C1-CF42ADB76869@yesql.se
Whole thread Raw
In response to Re: generic plans and "initial" pruning  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: generic plans and "initial" pruning  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-hackers
> On 8 Jun 2023, at 16:23, Amit Langote <amitlangote09@gmail.com> wrote:
> 
> Here is a new version.

The local planstate variable in the hunk below is shadowing the function
parameter planstate which cause a compiler warning:

@@ -1495,18 +1556,15 @@ ExecEndPlan(PlanState *planstate, EState *estate)
     ListCell   *l;
 
     /*
-     * shut down the node-type-specific query processing
-     */
-    ExecEndNode(planstate);
-
-    /*
-     * for subplans too
+     * Shut down the node-type-specific query processing for all nodes that
+     * were initialized during InitPlan(), both in the main plan tree and those
+     * in subplans (es_subplanstates), if any.
      */
-    foreach(l, estate->es_subplanstates)
+    foreach(l, estate->es_inited_plannodes)
     {
-        PlanState  *subplanstate = (PlanState *) lfirst(l);
+        PlanState  *planstate = (PlanState *) lfirst(l);

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: logicalrep_message_type throws an error
Next
From: Heikki Linnakangas
Date:
Subject: Re: Track Oldest Initialized WAL Buffer Page