diff --git a/src/backend/distributed/commands/table.c b/src/backend/distributed/commands/table.c index 467756c0b..4311b53b6 100644 --- a/src/backend/distributed/commands/table.c +++ b/src/backend/distributed/commands/table.c @@ -1318,7 +1318,7 @@ ConvertPostgresLocalTablesToCitusLocalTables(AlterTableStmt *alterTableStatement */ continue; } - else if (IsCitusTable(relationId)) + else if (IsCitusTableType(relationId, CITUS_LOCAL_TABLE)) { CitusTableCacheEntry *entry = GetCitusTableCacheEntry(relationId); if (!entry->autoConverted || autoConverted) @@ -1339,6 +1339,11 @@ ConvertPostgresLocalTablesToCitusLocalTables(AlterTableStmt *alterTableStatement continue; } } + else if (IsCitusTable(relationId)) + { + /* we can directly skip for table types other than citus local tables */ + continue; + } /* * The only reason behind using a try/catch block here is giving a proper