Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5a15149

Browse files
committed
It seems that ExecInit/EndIndexScan is leaking some memory...
For example, if I run a query, that uses an index scan, and callMemoryContextSt ats (CurrentMemoryContext) before ExecutorStart() andafter ExecutorEnd() in ProcessQuery(), I am consistently see ing thatthe 'after' call shows 256 bytes more used, then 'before'...The problem seems to be in ExecEndIndexScan - it does not releasescanstate, ind exstate, indexstate->iss_RelationDescs and indexstate ->iss_ScanDescs...Dmitry Tkach
1 parenteb4e4fd commit5a15149

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/backend/executor/nodeIndexscan.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.69 2002/06/20 20:29:28 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.70 2002/06/23 21:29:32 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -516,6 +516,10 @@ ExecEndIndexScan(IndexScan *node)
516516
*/
517517
ExecClearTuple(scanstate->cstate.cs_ResultTupleSlot);
518518
ExecClearTuple(scanstate->css_ScanTupleSlot);
519+
pfree(scanstate);
520+
pfree(indexstate->iss_RelationDescs);
521+
pfree(indexstate->iss_ScanDescs);
522+
pfree(indexstate);
519523
}
520524

521525
/* ----------------------------------------------------------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp