diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-09-24 18:54:02 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-09-24 18:54:02 +0000 |
commit | a56a016ceb612cdee1ddc5990682f36d541e5b07 (patch) | |
tree | c496319424e0445562dd42ee7229e6d87567996f /src/backend/executor/nodeIndexscan.c | |
parent | 5f78c6a886a22209dee62de0c13edd6a68453011 (diff) | |
download | postgresql-a56a016ceb612cdee1ddc5990682f36d541e5b07.tar.gz postgresql-a56a016ceb612cdee1ddc5990682f36d541e5b07.zip |
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.
Diffstat (limited to 'src/backend/executor/nodeIndexscan.c')
-rw-r--r-- | src/backend/executor/nodeIndexscan.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index f93802269da..6ab2f0a47bd 100644 --- a/src/backend/executor/nodeIndexscan.c +++ b/src/backend/executor/nodeIndexscan.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.83 2003/08/22 20:26:43 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.84 2003/09/24 18:54:01 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -964,12 +964,6 @@ ExecInitIndexScan(IndexScan *node, EState *estate) currentRelation = heap_open(reloid, AccessShareLock); - if (!RelationGetForm(currentRelation)->relhasindex) - ereport(ERROR, - (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("indexes of relation %u were deactivated", - reloid))); - indexstate->ss.ss_currentRelation = currentRelation; indexstate->ss.ss_currentScanDesc = NULL; /* no heap scan here */ |