From 76ccf73f2bd3c8af621c24fd3ebddcc2ff21d807 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 21 Nov 1999 01:58:22 +0000 Subject: Repair problem exposed by Jan's new parallel-regression-test scaffold: inval.c thought it could safely use the catcache to look up the OIDs of system relations. Not good, considering that inval.c could be called during catcache loading, if a shared-inval message arrives. Rip out the lookup logic and instead use the known OIDs from pg_class.h. --- src/backend/utils/cache/catcache.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'src/backend/utils/cache/catcache.c') diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c index 423a5d72861..e5a1684041c 100644 --- a/src/backend/utils/cache/catcache.c +++ b/src/backend/utils/cache/catcache.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.52 1999/11/19 18:51:48 wieck Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.53 1999/11/21 01:58:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -819,7 +819,7 @@ InitSysCache(char *relname, * -------------------------------- */ static HeapTuple -SearchSelfReferences(const struct catcache * cache) +SearchSelfReferences(struct catcache * cache) { HeapTuple ntp; Relation rel; @@ -983,23 +983,11 @@ SearchSysCache(struct catcache * cache, * ---------------- */ - /* ---------- - * It is definitely insufficient. While modifying the regression - * test to run independent tests concurrently it happened, that - * this code fails VERY often. ISTM that 'cache' points into - * shared memory, but that 'busy' means this backend is loading - * a new entry. So when another backend has set busy, this one - * think's it detected a recursion. - * - * Need's a smarter detection mechanism - Jan - * if (cache->busy) { elog(ERROR, "SearchSysCache: recursive use of cache %d", cache->id); } cache->busy = true; - * ---------- - */ /* ---------------- * open the relation associated with the cache -- cgit v1.2.3