You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* Some "black magic here":( We want to avoid redundant execution of utility statement by ProcessUtilitySlow (which is done with PROCESS_UTILITY_SUBCOMMAND).
5152
-
* But if we allow only PROCESS_UTILITY_TOPLEVEL context, then we will not replicated DDL inside dynamic queries in plpgsql functions (see https://jira.postgrespro.ru/browse/CORE-526).
5153
-
* If we disable only PROCESS_UTILITY_SUBCOMMAND, then we will get problems with "create extension" which is executed also in PROCESS_UTILITY_QUERY context.
5154
-
* So workaround at this moment is to treat extension as special case.
5155
-
* TODO: try to find right solution and rewrite this dummy check.
5156
-
*/
5157
-
if (!skipCommand&& (context==PROCESS_UTILITY_TOPLEVEL|| (context==PROCESS_UTILITY_QUERY&& !creating_extension) ||MtmUtilityProcessedInXid!=GetCurrentTransactionId()))
5158
-
MtmUtilityProcessedInXid=InvalidTransactionId;
5159
-
5160
-
if (!skipCommand&& !MtmTx.isReplicated&& (MtmUtilityProcessedInXid==InvalidTransactionId)) {
5150
+
if (!skipCommand&& !MtmTx.isReplicated&& (context==PROCESS_UTILITY_TOPLEVEL||MtmUtilityProcessedInXid!=GetCurrentTransactionId()))
0 commit comments