From a56a016ceb612cdee1ddc5990682f36d541e5b07 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 24 Sep 2003 18:54:02 +0000 Subject: Repair some REINDEX problems per recent discussions. The relcache is now able to cope with assigning new relfilenode values to nailed-in-cache indexes, so they can be reindexed using the fully crash-safe method. This leaves only shared system indexes as special cases. Remove the 'index deactivation' code, since it provides no useful protection in the shared- index case. Require reindexing of shared indexes to be done in standalone mode, but remove other restrictions on REINDEX. -P (IgnoreSystemIndexes) now prevents using indexes for lookups, but does not disable index updates. It is therefore safe to allow from PGOPTIONS. Upshot: reindexing system catalogs can be done without a standalone backend for all cases except shared catalogs. --- src/backend/utils/cache/syscache.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/backend/utils/cache/syscache.c') diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c index aa89bb81787..9b250eef62e 100644 --- a/src/backend/utils/cache/syscache.c +++ b/src/backend/utils/cache/syscache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.90 2003/08/04 02:40:06 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.91 2003/09/24 18:54:01 tgl Exp $ * * NOTES * These routines allow the parser/planner/executor to perform @@ -436,19 +436,11 @@ static const struct cachedesc cacheinfo[] = { }} }; -static CatCache *SysCache[ - lengthof(cacheinfo)]; +static CatCache *SysCache[lengthof(cacheinfo)]; static int SysCacheSize = lengthof(cacheinfo); static bool CacheInitialized = false; -bool -IsCacheInitialized(void) -{ - return CacheInitialized; -} - - /* * InitCatalogCache - initialize the caches * -- cgit v1.2.3