git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 061d4e2)
Don't try to free executor state of an InitPlan early --- this breaks
2002年12月26日 22:37:42 +0000 (22:37 +0000)
2002年12月26日 22:37:42 +0000 (22:37 +0000)
EXPLAIN ANALYZE. (Premature optimization is the root of all evil?)


diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c
index 2f5ab52e213bcd41a56d592f050e9ae655b0ef85..5a6950e0bee0959017cff6b96168e9dc3c66f48d 100644 (file)
--- a/src/backend/executor/nodeSubplan.c
+++ b/src/backend/executor/nodeSubplan.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeSubplan.c,v 1.39 2002年12月15日 16:17:46 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeSubplan.c,v 1.40 2002年12月26日 22:37:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -475,15 +475,6 @@ ExecSetParamPlan(SubPlanState *node, ExprContext *econtext)
}
}
- if (planstate->plan->extParam == NULL) /* un-correlated ... */
- {
- ExecEndPlan(planstate, node->sub_estate);
- /* mustn't free context while still in it... */
- MemoryContextSwitchTo(oldcontext);
- FreeExecutorState(node->sub_estate);
- node->needShutdown = false;
- }
-
MemoryContextSwitchTo(oldcontext);
}
@@ -502,6 +493,8 @@ ExecEndSubPlan(SubPlanState *node)
ExecEndPlan(node->planstate, node->sub_estate);
MemoryContextSwitchTo(oldcontext);
FreeExecutorState(node->sub_estate);
+ node->sub_estate = NULL;
+ node->planstate = NULL;
node->needShutdown = false;
}
if (node->curTuple)
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /