From 88210542106de5b26fe6aa088d1811b68502d224 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 7 Jul 2022 11:23:40 -0400 Subject: Remove stray references to lefttree/righttree in the executor. The general convention in the executor is to refer to child plans and planstates via the outerPlan[State] and innerPlan[State] macros, but a few places didn't do it like that. For consistency and readability, convert all the stragglers to use the macros. (See also commit 40f42d2a3, which did some similar cleanup a few years ago, but missed these cases.) Richard Guo Discussion: https://postgr.es/m/CAMbWs4-vYhh1xsa_veah4PUed2Xq=Ed_YH3=Mqt5A3Y=EgfCEg@mail.gmail.com --- src/backend/executor/nodeGather.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/executor/nodeGather.c') diff --git a/src/backend/executor/nodeGather.c b/src/backend/executor/nodeGather.c index 4f8a17df7da..1283d5b737a 100644 --- a/src/backend/executor/nodeGather.c +++ b/src/backend/executor/nodeGather.c @@ -168,13 +168,13 @@ ExecGather(PlanState *pstate) /* Initialize, or re-initialize, shared state needed by workers. */ if (!node->pei) - node->pei = ExecInitParallelPlan(node->ps.lefttree, + node->pei = ExecInitParallelPlan(outerPlanState(node), estate, gather->initParam, gather->num_workers, node->tuples_needed); else - ExecParallelReinitialize(node->ps.lefttree, + ExecParallelReinitialize(outerPlanState(node), node->pei, gather->initParam); -- cgit v1.2.3