aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/indexcmds.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2007-09-10 22:02:05 +0000
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2007-09-10 22:02:05 +0000
commit8f11bb191963026db6904e66c8fcf94bcd15ca51 (patch)
tree91cca5e9da37731b2c2a9535721d6f090537befa /src/backend/commands/indexcmds.c
parent053731ab0a3ab8dc98742a71780e52f4d39e10c4 (diff)
downloadpostgresql-8f11bb191963026db6904e66c8fcf94bcd15ca51.tar.gz
postgresql-8f11bb191963026db6904e66c8fcf94bcd15ca51.zip
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 87dec1909d8..04593017485 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.149.2.1 2007/08/25 19:08:25 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/indexcmds.c,v 1.149.2.2 2007/09/10 22:02:05 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1217,6 +1217,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))
{