Skip to content

Commit 80daa6b

Browse files
committed
Fix infinite loop of non-tx ddl statements
1 parent bf78c9e commit 80daa6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/mmts/multimaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3897,7 +3897,7 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
38973897
case T_IndexStmt:
38983898
{
38993899
IndexStmt *indexStmt = (IndexStmt *) parsetree;
3900-
if (indexStmt->concurrent && !IsTransactionBlock())
3900+
if (indexStmt->concurrent && !IsTransactionBlock() && !MtmTx.isReplicated)
39013901
{
39023902
skipCommand = true;
39033903
MtmProcessDDLCommand(queryString, false);
@@ -3909,7 +3909,7 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
39093909
case T_DropStmt:
39103910
{
39113911
DropStmt *stmt = (DropStmt *) parsetree;
3912-
if (stmt->removeType == OBJECT_INDEX && stmt->concurrent && !IsTransactionBlock())
3912+
if (stmt->removeType == OBJECT_INDEX && stmt->concurrent && !IsTransactionBlock() && !MtmTx.isReplicated)
39133913
{
39143914
skipCommand = true;
39153915
MtmProcessDDLCommand(queryString, false);

0 commit comments

Comments
 (0)