Ensure that CREATE STATISTICS statement is forwarded to remote nodes.
authorPavan Deolasee <[email protected]>
Fri, 16 Jun 2017 08:31:00 +0000 (14:01 +0530)
committerPavan Deolasee <[email protected]>
Fri, 16 Jun 2017 08:31:00 +0000 (14:01 +0530)
This is a new utility statement added in PG 10 and we should ensure that it
gets propagated to all the nodes in the cluster.

src/backend/tcop/utility.c

index d3eba7bcdf4c991f8f000b7003723d1419243d25..3fdf5c84da4c6491110acd4e90fcb88d6693083f 100644 (file)
@@ -2565,6 +2565,10 @@ ProcessUtilitySlow(ParseState *pstate,
 
                        case T_CreateStatsStmt:
                                address = CreateStatistics((CreateStatsStmt *) parsetree);
+#ifdef PGXC
+                               if (IS_PGXC_LOCAL_COORDINATOR)
+                                       ExecUtilityStmtOnNodes(queryString, NULL, sentToRemote, false, EXEC_ON_ALL_NODES, false);
+#endif
                                break;
 
                        case T_AlterCollationStmt: