summaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeAgg.c
diff options
context:
space:
mode:
authorAmit Langote2023-09-28 00:44:39 +0000
committerAmit Langote2023-09-28 00:44:39 +0000
commitd060e921ea5aa47b6265174c32e1128cebdbc3df (patch)
treec99915a37571d3e5e1792069677069d4bc1d9c86 /src/backend/executor/nodeAgg.c
parent9210afd3bcd65feccb883ace4ed6dcef6a684585 (diff)
Remove obsolete executor cleanup code
This commit removes unnecessary ExecExprFreeContext() calls in ExecEnd* routines because the actual cleanup is managed by FreeExecutorState(). With no callers remaining for ExecExprFreeContext(), this commit also removes the function. This commit also drops redundant ExecClearTuple() calls, because ExecResetTupleTable() in ExecEndPlan() already takes care of resetting and dropping all TupleTableSlots initialized with ExecInitScanTupleSlot() and ExecInitExtraTupleSlot(). After these modifications, the ExecEnd*() routines for ValuesScan, NamedTuplestoreScan, and WorkTableScan became redundant. So, this commit removes them. Reviewed-by: Robert Haas Discussion: https://postgr.es/m/CA+HiwqFGkMSge6TgC9KQzde0ohpAycLQuV7ooitEEpbKB0O_mg@mail.gmail.com
Diffstat (limited to 'src/backend/executor/nodeAgg.c')
-rw-r--r--src/backend/executor/nodeAgg.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 468db94fe5b..f154f289028 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -4357,16 +4357,6 @@ ExecEndAgg(AggState *node)
if (node->hashcontext)
ReScanExprContext(node->hashcontext);
- /*
- * We don't actually free any ExprContexts here (see comment in
- * ExecFreeExprContext), just unlinking the output one from the plan node
- * suffices.
- */
- ExecFreeExprContext(&node->ss.ps);
-
- /* clean up tuple table */
- ExecClearTuple(node->ss.ss_ScanTupleSlot);
-
outerPlan = outerPlanState(node);
ExecEndNode(outerPlan);
}