It seems that ExecInit/EndIndexScan is leaking some memory...

For example, if I run a query, that uses an index scan, and call
MemoryContextSt ats (CurrentMemoryContext) before ExecutorStart() and
after ExecutorEnd() in ProcessQuery(), I am consistently see ing that
the 'after' call shows 256 bytes more used, then 'before'...

The problem seems to be in ExecEndIndexScan - it does not release
scanstate, ind exstate, indexstate->iss_RelationDescs and indexstate ->
iss_ScanDescs...

Dmitry Tkach
This commit is contained in:
Bruce Momjian 2002-06-23 21:29:32 +00:00
parent eb4e4fd262
commit 5a15149736

View file

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.69 2002/06/20 20:29:28 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.70 2002/06/23 21:29:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -516,6 +516,10 @@ ExecEndIndexScan(IndexScan *node)
*/
ExecClearTuple(scanstate->cstate.cs_ResultTupleSlot);
ExecClearTuple(scanstate->css_ScanTupleSlot);
pfree(scanstate);
pfree(indexstate->iss_RelationDescs);
pfree(indexstate->iss_ScanDescs);
pfree(indexstate);
}
/* ----------------------------------------------------------------