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.