Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 18001c1

Browse files
knizhnikkelvich
authored andcommitted
Ignore concurrent option in create index and enable user two-phase transactions
1 parent 7694665 commit 18001c1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

multimaster.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3776,6 +3776,16 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
37763776
MTM_LOG3("%d: Process utility statement %s", MyProcPid, queryString);
37773777
switch (nodeTag(parsetree))
37783778
{
3779+
case T_IndexStmt:
3780+
{
3781+
IndexStmt* stmt = (IndexStmt*) parsetree;
3782+
if (stmt->concurrent) {
3783+
stmt->concurrent = false;
3784+
elog(WARNING, "Disable concurrent option for index creation");
3785+
}
3786+
break;
3787+
}
3788+
37793789
case T_TransactionStmt:
37803790
{
37813791
TransactionStmt *stmt = (TransactionStmt *) parsetree;
@@ -3791,7 +3801,7 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
37913801
}
37923802
break;
37933803
case TRANS_STMT_PREPARE:
3794-
elog(ERROR, "Two phase commit is not supported by multimaster");
3804+
//elog(ERROR, "Two phase commit is not supported by multimaster");
37953805
break;
37963806
case TRANS_STMT_COMMIT_PREPARED:
37973807
case TRANS_STMT_ROLLBACK_PREPARED:

0 commit comments

Comments
 (0)