aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/index/indexam.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-12-30 05:05:13 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-12-30 05:05:13 +0000
commit9c95f8c9b298c1badb4376eabad53b35a8ac4f2b (patch)
tree8bb89eb69751313f9e62458fba1a7dd233749267 /src/backend/access/index/indexam.c
parent649ffe161653f2e3f181f616de62ccc467d8c879 (diff)
downloadpostgresql-9c95f8c9b298c1badb4376eabad53b35a8ac4f2b.tar.gz
postgresql-9c95f8c9b298c1badb4376eabad53b35a8ac4f2b.zip
Repair bugs discussed in pghackers thread of 15 May 1999: creation of a
relcache entry no longer leaks a small amount of memory. index_endscan now releases all the memory acquired by index_beginscan, so callers of it should NOT pfree the scan descriptor anymore.
Diffstat (limited to 'src/backend/access/index/indexam.c')
-rw-r--r--src/backend/access/index/indexam.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c
index 1a7ee4d3771..dc08d10bc31 100644
--- a/src/backend/access/index/indexam.c
+++ b/src/backend/access/index/indexam.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.37 1999/11/07 23:07:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.38 1999/12/30 05:04:50 tgl Exp $
*
* INTERFACE ROUTINES
* index_open - open an index relation by relationId
@@ -298,6 +298,9 @@ index_endscan(IndexScanDesc scan)
UnlockRelation(scan->relation, AccessShareLock);
RelationDecrementReferenceCount(scan->relation);
+
+ /* Release the scan data structure itself */
+ IndexScanEnd(scan);
}
/* ----------------