From 67f677c9215bcbed8bfa17379a41c9b242b9a5f7 Mon Sep 17 00:00:00 2001 From: Onur Tirtir Date: Tue, 5 Jan 2021 19:50:20 +0300 Subject: [PATCH] fixup! Consider fkey graph invalidations due to CREATE TABLE cmds too --- src/backend/distributed/commands/utility_hook.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/backend/distributed/commands/utility_hook.c b/src/backend/distributed/commands/utility_hook.c index aa5481737..c3275e556 100644 --- a/src/backend/distributed/commands/utility_hook.c +++ b/src/backend/distributed/commands/utility_hook.c @@ -536,13 +536,6 @@ multi_ProcessUtility(PlannedStmt *pstmt, * Post process for ddl statements */ - if (IsA(parsetree, CreateStmt)) - { - CreateStmt *createStatement = (CreateStmt *) parsetree; - - PostprocessCreateTableStmt(createStatement, queryString); - } - if (EnableDDLPropagation) { if (ops && ops->postprocess) @@ -566,6 +559,13 @@ multi_ProcessUtility(PlannedStmt *pstmt, } } + if (IsA(parsetree, CreateStmt)) + { + CreateStmt *createStatement = (CreateStmt *) parsetree; + + PostprocessCreateTableStmt(createStatement, queryString); + } + /* * We only process ALTER TABLE ... ATTACH PARTITION commands in the function below * and distribute the partition if necessary.