summaryrefslogtreecommitdiff
path: root/src/backend/commands/indexcmds.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2007-09-10 21:59:37 +0000
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2007-09-10 21:59:37 +0000
commitb366562e43a8cd70bfb73efd8f5508608f92fd9b (patch)
treeb0530d94ffe068e59392ca90d6d3bdb838ec57cf /src/backend/commands/indexcmds.c
parent6a10f0f74957190b093f1b1147b1f2767548db90 (diff)
Make CLUSTER and REINDEX silently skip remote temp tables in their
database-wide editions. Per report from bitsandbytes88 <at> hotmail.com and subsequent discussion.
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r--src/backend/commands/indexcmds.c6
1 files changed, 5 insertions, 1 deletions
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))
{