mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user