From b366562e43a8cd70bfb73efd8f5508608f92fd9b Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 10 Sep 2007 21:59:37 +0000 Subject: Make CLUSTER and REINDEX silently skip remote temp tables in their database-wide editions. Per report from bitsandbytes88 hotmail.com and subsequent discussion. --- src/backend/commands/indexcmds.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/backend/commands/indexcmds.c') diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 5c418f8b7a3..ebac5957bd2 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.164 2007/09/07 00:58:56 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/indexcmds.c,v 1.165 2007/09/10 21:59:37 alvherre Exp $ * *------------------------------------------------------------------------- */ @@ -1313,6 +1313,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)) { -- cgit v1.2.3