diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2007-09-12 20:21:23 +0000 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2007-09-12 20:21:23 +0000 |
commit | 07c822672b03260e8693bcdf51d4cd9313344f02 (patch) | |
tree | 54976edf2bf69426e41f1741330d99a6cf7c0ff9 | |
parent | 57dcb0f81d191fa35daec026b9ffa8faf947b72b (diff) | |
download | postgresql-07c822672b03260e8693bcdf51d4cd9313344f02.tar.gz postgresql-07c822672b03260e8693bcdf51d4cd9313344f02.zip |
Make REINDEX DATABASE silently skip remote temp tables.
Per report from bitsandbytes88 <at> hotmail.com and subsequent discussion.
This is a back patch of a patch committed yesterday to CLUSTER and REINDEX.
REINDEX only processes user indexes as of 8.1, so we needn't backpatch this any
further. (CLUSTER was backpatched separately all the way back to 7.4).
-rw-r--r-- | src/backend/commands/indexcmds.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index de9ddd258bd..81ab2e8046f 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/indexcmds.c,v 1.134.2.3 2007/08/25 19:08:31 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/indexcmds.c,v 1.134.2.4 2007/09/12 20:21:23 alvherre Exp $ * *------------------------------------------------------------------------- */ @@ -1062,6 +1062,10 @@ ReindexDatabase(const char *databaseName, bool do_system, bool do_user) if (classtuple->relkind != RELKIND_RELATION) continue; + /* Skip temp tables of other backends; we can't reindex them at all */ + if (isOtherTempNamespace(classtuple->relnamespace)) + continue; + /* Check user/system classification, and optionally skip */ if (IsSystemClass(classtuple)) { |