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/tcop/postgres.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/backend/tcop/postgres.c') diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index c84d119ad78..e61c866b374 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.363 2003/09/14 00:03:32 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.364 2003/09/24 18:54:01 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -2252,9 +2252,12 @@ PostgresMain(int argc, char *argv[], const char *username) /* * ignore system indexes + * + * As of PG 7.4 this is safe to allow from the client, + * since it only disables reading the system indexes, + * not writing them. Worst case consequence is slowness. */ - if (secure) /* XXX safe to allow from client??? */ - IgnoreSystemIndexes(true); + IgnoreSystemIndexes(true); break; case 'o': @@ -2658,7 +2661,7 @@ PostgresMain(int argc, char *argv[], const char *username) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.363 $ $Date: 2003/09/14 00:03:32 $\n"); + puts("$Revision: 1.364 $ $Date: 2003/09/24 18:54:01 $\n"); } /* -- cgit v1.2.3