diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-07-12 02:37:39 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-07-12 02:37:39 +0000 |
commit | badce86a2c327b40c6146242526d1523455d64a6 (patch) | |
tree | 6e0cb658889a2688e76d9ac19a56555c5eb0e738 /src/backend/executor/execAmi.c | |
parent | 46fb9c29e2990ba470bb741ff6dd60f2ae218e64 (diff) |
First stage of reclaiming memory in executor by resetting short-term
memory contexts. Currently, only leaks in expressions executed as
quals or projections are handled. Clean up some old dead cruft in
executor while at it --- unused fields in state nodes, that sort of thing.
Diffstat (limited to 'src/backend/executor/execAmi.c')
-rw-r--r-- | src/backend/executor/execAmi.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c index ff3fa0b6ed1..10478f60ad6 100644 --- a/src/backend/executor/execAmi.c +++ b/src/backend/executor/execAmi.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: execAmi.c,v 1.48 2000/06/18 22:44:03 tgl Exp $ + * $Id: execAmi.c,v 1.49 2000/07/12 02:37:00 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -171,8 +171,8 @@ ExecBeginScan(Relation relation, /* ---------------------------------------------------------------- * ExecCloseR * - * closes the relation and scan descriptor for a scan or sort - * node. Also closes index relations and scans for index scans. + * closes the relation and scan descriptor for a scan node. + * Also closes index relations and scans for index scans. * ---------------------------------------------------------------- */ void @@ -197,20 +197,12 @@ ExecCloseR(Plan *node) state = ((IndexScan *) node)->scan.scanstate; break; - case T_Sort: - state = &(((Sort *) node)->sortstate->csstate); - break; - - case T_Agg: - state = &(((Agg *) node)->aggstate->csstate); - break; - case T_TidScan: state = ((TidScan *) node)->scan.scanstate; break; default: - elog(DEBUG, "ExecCloseR: not a scan or sort node!"); + elog(DEBUG, "ExecCloseR: not a scan node!"); return; } @@ -237,13 +229,12 @@ ExecCloseR(Plan *node) if (IsA(node, IndexScan)) { IndexScan *iscan = (IndexScan *) node; - IndexScanState *indexstate; + IndexScanState *indexstate = iscan->indxstate; int numIndices; RelationPtr indexRelationDescs; IndexScanDescPtr indexScanDescs; int i; - indexstate = iscan->indxstate; numIndices = indexstate->iss_NumIndices; indexRelationDescs = indexstate->iss_RelationDescs; indexScanDescs = indexstate->iss_ScanDescs; |