1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-23 14:01:44 +03:00

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!
This commit is contained in:
Tom Lane
2000-01-29 19:51:59 +00:00
parent 98c6e81e94
commit 04103e00f1
2 changed files with 27 additions and 9 deletions

View File

@ -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);
}
/* --------------------------------