From 0e85d8806cbe676df516ca02795b5a0acb38a32f Mon Sep 17 00:00:00 2001 From: Onur Tirtir Date: Wed, 6 Jan 2021 12:58:33 +0300 Subject: [PATCH] Revert "Cover attach partition commands" This reverts commit fc8cc90845aa892fe90f2c74c86d33918cdffb75. --- src/backend/distributed/commands/table.c | 30 ------------------------ 1 file changed, 30 deletions(-) diff --git a/src/backend/distributed/commands/table.c b/src/backend/distributed/commands/table.c index 963a2250b..089f1b838 100644 --- a/src/backend/distributed/commands/table.c +++ b/src/backend/distributed/commands/table.c @@ -251,19 +251,6 @@ PostprocessCreateTableStmtPartitionOf(CreateStmt *createStatement, const CreateDistributedTable(relationId, parentDistributionColumn, parentDistributionMethod, parentRelationName, viaDeprecatedAPI); - return; - } - - /* - * If parent is a postgres local table, then invalidate foreign key cache - * if the parent table is involved in any foreign key relationship. This is - * because, partition tables inherit foreign keys from parent tables. - * Note that if parent table is a citus table, then CreateDistributedTable - * already invalidates foreign key cache and we handle that case above. - */ - if ((TableReferenced(parentRelationId) || TableReferencing(parentRelationId))) - { - InvalidateForeignKeyGraph(); } } @@ -339,23 +326,6 @@ PostprocessAlterTableStmtAttachPartition(AlterTableStmt *alterTableStatement, distributionMethod, parentRelationName, viaDeprecatedAPI); } - - if (!IsCitusTable(relationId) && - !IsCitusTable(partitionRelationId)) - { - /* - * If parent and child tables are postgres local tables, then invalidate - * foreign key cache if the parent table is involved in any foreign key - * relationship. This is because, partition tables inherit foreign keys - * from parent tables. - * Note that if parent table is a citus table, then CreateDistributedTable - * already invalidates foreign key cache and we handle that case above. - */ - if ((TableReferenced(relationId) || TableReferencing(relationId))) - { - InvalidateForeignKeyGraph(); - } - } } }