1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-22 02:52:08 +03:00

Make CLUSTER and REINDEX silently skip remote temp tables in their

database-wide editions.

Per report from bitsandbytes88 <at> hotmail.com and subsequent discussion.
This commit is contained in:
Alvaro Herrera
2007-09-10 21:59:37 +00:00
parent 6a10f0f749
commit b366562e43
2 changed files with 30 additions and 2 deletions

View File

@ -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))
{