diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-11-21 01:58:22 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-11-21 01:58:22 +0000 |
commit | 76ccf73f2bd3c8af621c24fd3ebddcc2ff21d807 (patch) | |
tree | 4cc68c70e989fde1a29850fb97b6660e93d17e22 /src/backend/utils/cache/catcache.c | |
parent | 9ba0172f41c1f7ab577d056c29099de89affeca8 (diff) | |
download | postgresql-76ccf73f2bd3c8af621c24fd3ebddcc2ff21d807.tar.gz postgresql-76ccf73f2bd3c8af621c24fd3ebddcc2ff21d807.zip |
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.
Diffstat (limited to 'src/backend/utils/cache/catcache.c')
-rw-r--r-- | src/backend/utils/cache/catcache.c | 16 |
1 files changed, 2 insertions, 14 deletions
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 |