aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xact.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-08-02 22:36:05 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-08-02 22:36:05 +0000
commit22c64f18349dfba623f9c844363b484475d3c45e (patch)
treea4d87182a595ed7a32541d50712da12247f0ba8f /src/backend/access/transam/xact.c
parent154f26ff5960ea11d0d5683dd2a119dc15d01218 (diff)
downloadpostgresql-22c64f18349dfba623f9c844363b484475d3c45e.tar.gz
postgresql-22c64f18349dfba623f9c844363b484475d3c45e.zip
When compiling with --enable-cassert, check for reference count leaks
in the relcache. It's rather silly that we have reference count leak checks in bufmgr and in catcache, but not in relcache which will normally have many fewer entries. Chris K-L would have caught at least one bug in his recent DROP patch if he'd had this.
Diffstat (limited to 'src/backend/access/transam/xact.c')
-rw-r--r--src/backend/access/transam/xact.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 43beb6b6066..3a992f6ccfe 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.128 2002/06/20 20:29:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.129 2002/08/02 22:36:05 tgl Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
@@ -615,6 +615,8 @@ RecordTransactionCommit(void)
static void
AtCommit_Cache(void)
{
+ /* Check for relcache reference-count leaks */
+ AtEOXactRelationCache(true);
/*
* Make catalog changes visible to all backends.
*/
@@ -741,7 +743,7 @@ RecordTransactionAbort(void)
static void
AtAbort_Cache(void)
{
- RelationCacheAbort();
+ AtEOXactRelationCache(false);
AtEOXactInvalidationMessages(false);
}