aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/relcache.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-11-21 01:58:22 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-11-21 01:58:22 +0000
commit76ccf73f2bd3c8af621c24fd3ebddcc2ff21d807 (patch)
tree4cc68c70e989fde1a29850fb97b6660e93d17e22 /src/backend/utils/cache/relcache.c
parent9ba0172f41c1f7ab577d056c29099de89affeca8 (diff)
downloadpostgresql-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/relcache.c')
-rw-r--r--src/backend/utils/cache/relcache.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index d6d2ee4b4e9..b6684744119 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.79 1999/11/18 13:56:28 wieck Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.80 1999/11/21 01:58:22 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -209,11 +209,6 @@ do { \
static void formrdesc(char *relationName, u_int natts,
FormData_pg_attribute *att);
-#ifdef NOT_USED /* See comments at line 1304 */
-static void RelationFlushIndexes(Relation *r, Oid accessMethodId);
-
-#endif
-
static HeapTuple ScanPgRelation(RelationBuildDescInfo buildinfo);
static HeapTuple scan_pg_rel_seq(RelationBuildDescInfo buildinfo);
static HeapTuple scan_pg_rel_ind(RelationBuildDescInfo buildinfo);
@@ -1431,12 +1426,9 @@ RelationIdInvalidateRelationCacheByRelationId(Oid relationId)
}
}
-#if NOT_USED /* See comments at line 1304 */
-/* --------------------------------
- * RelationIdInvalidateRelationCacheByAccessMethodId
- *
- * RelationFlushIndexes is needed for use with HashTableWalk..
- * --------------------------------
+#if NOT_USED
+/* only used by RelationIdInvalidateRelationCacheByAccessMethodId,
+ * which is dead code.
*/
static void
RelationFlushIndexes(Relation *r,
@@ -1459,11 +1451,10 @@ RelationFlushIndexes(Relation *r,
#endif
+#if NOT_USED
void
RelationIdInvalidateRelationCacheByAccessMethodId(Oid accessMethodId)
{
-#ifdef NOT_USED
-
/*
* 25 aug 1992: mao commented out the ht walk below. it should be
* doing the right thing, in theory, but flushing reldescs for index
@@ -1471,14 +1462,15 @@ RelationIdInvalidateRelationCacheByAccessMethodId(Oid accessMethodId)
* don't want to introduce new bugs. this code never executed before,
* so i'm turning it off for now. after the release is cut, i'll fix
* this up.
+ *
+ * 20 nov 1999: this code has still never done anything, so I'm
+ * cutting the routine out of the system entirely. tgl
*/
HashTableWalk(RelationNameCache, (HashtFunc) RelationFlushIndexes,
accessMethodId);
-#else
- return;
-#endif
}
+#endif
/*
* RelationCacheInvalidate