From 04103e00f1f0ce12c29954d069e1d4437467f700 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 29 Jan 2000 19:51:59 +0000 Subject: Modify uses of RelationFlushRelation and RelationCacheInvalidate so that we *always* rebuild, rather than deleting, an invalidated relcache entry that has positive refcount. Otherwise an SI cache overrun leads to dangling Relation pointers all over the place! --- src/backend/utils/cache/inval.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/backend/utils/cache/inval.c') diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c index ce4230da4f1..473978bd410 100644 --- a/src/backend/utils/cache/inval.c +++ b/src/backend/utils/cache/inval.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.32 2000/01/26 05:57:17 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.33 2000/01/29 19:51:59 tgl Exp $ * * Note - this code is real crufty... * @@ -548,15 +548,16 @@ CacheIdInvalidate(Index cacheId, /* -------------------------------- * ResetSystemCaches * - * this blows away all tuples in the system catalog caches and - * all the cached relation descriptors (and closes the files too). + * This blows away all tuples in the system catalog caches and + * all the cached relation descriptors (and closes their files too). + * Relation descriptors that have positive refcounts are then rebuilt. * -------------------------------- */ static void ResetSystemCaches() { ResetSystemCache(); - RelationCacheInvalidate(false); + RelationCacheInvalidate(true); } /* -------------------------------- -- cgit v1.2.3