Don't run ALTER ENUM in an autocommit block on remote nodes
authorPavan Deolasee <[email protected]>
Mon, 31 Jul 2017 14:21:58 +0000 (19:51 +0530)
committerPavan Deolasee <[email protected]>
Mon, 31 Jul 2017 14:21:58 +0000 (19:51 +0530)
Before PG 10, Postgres did not allow ALTER ENUM to be run inside a transaction
block. So we used to run these commands in auto-commit mode on the remote
nodes. But now Postgres has removed the restriction. So we also run the
statements in transaction block.

This fixes regression failures in the 'enum' test case.

src/backend/tcop/utility.c

index 1f00a4c651fe6f5d83013590d07e33392ca8a673..f70020727203abeec62eca740d80ad1fc052d2cf 100644 (file)
@@ -2160,7 +2160,7 @@ ProcessUtilitySlow(ParseState *pstate,
                                 */
                                if (IS_PGXC_LOCAL_COORDINATOR)
                                        ExecUtilityStmtOnNodes(queryString, NULL, sentToRemote,
-                                                       true, EXEC_ON_ALL_NODES, false);
+                                                       false , EXEC_ON_ALL_NODES, false);
 #endif
                                break;