@@ -755,9 +755,6 @@ MtmBeginTransaction(MtmCurrentTrans* x)
755
755
MtmUnlock ();
756
756
elog (ERROR , "Multimaster node is not online: current status %s" , MtmNodeStatusMnem [Mtm -> status ]);
757
757
}
758
- if (x -> isDistributed && XactIsoLevel != XACT_REPEATABLE_READ ) {
759
- elog (LOG , "Isolation level %s is not supported by multimaster" , isoLevelStr [XactIsoLevel ]);
760
- }
761
758
x -> containsDML = false;
762
759
x -> snapshot = MtmAssignCSN ();
763
760
x -> gtid .xid = InvalidTransactionId ;
@@ -984,9 +981,13 @@ MtmAbortPreparedTransaction(MtmCurrentTrans* x)
984
981
if (x -> status != TRANSACTION_STATUS_ABORTED ) {
985
982
MtmLock (LW_EXCLUSIVE );
986
983
tm = (MtmTransMap * )hash_search (MtmGid2State , x -> gid , HASH_REMOVE , NULL );
987
- Assert (tm != NULL && tm -> state != NULL );
988
- MTM_LOG1 ("Abort prepared transaction %d with gid='%s'" , x -> xid , x -> gid );
989
- MtmAbortTransaction (tm -> state );
984
+ if (tm == NULL ) {
985
+ elog (WARNING , "Global transaciton ID %s is not found" , x -> gid );
986
+ } else {
987
+ Assert (tm -> state != NULL );
988
+ MTM_LOG1 ("Abort prepared transaction %d with gid='%s'" , x -> xid , x -> gid );
989
+ MtmAbortTransaction (tm -> state );
990
+ }
990
991
MtmUnlock ();
991
992
x -> status = TRANSACTION_STATUS_ABORTED ;
992
993
} else {
@@ -3782,6 +3783,16 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
3782
3783
MTM_LOG3 ("%d: Process utility statement %s" , MyProcPid , queryString );
3783
3784
switch (nodeTag (parsetree ))
3784
3785
{
3786
+ case T_IndexStmt :
3787
+ {
3788
+ IndexStmt * stmt = (IndexStmt * ) parsetree ;
3789
+ if (stmt -> concurrent ) {
3790
+ stmt -> concurrent = false;
3791
+ elog (WARNING , "Disable concurrent option for index creation" );
3792
+ }
3793
+ break ;
3794
+ }
3795
+
3785
3796
case T_TransactionStmt :
3786
3797
{
3787
3798
TransactionStmt * stmt = (TransactionStmt * ) parsetree ;
@@ -3797,7 +3808,7 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
3797
3808
}
3798
3809
break ;
3799
3810
case TRANS_STMT_PREPARE :
3800
- elog (ERROR , "Two phase commit is not supported by multimaster" );
3811
+ // elog(ERROR, "Two phase commit is not supported by multimaster");
3801
3812
break ;
3802
3813
case TRANS_STMT_COMMIT_PREPARED :
3803
3814
case TRANS_STMT_ROLLBACK_PREPARED :
@@ -3957,7 +3968,11 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
3957
3968
standard_ProcessUtility (parsetree , queryString , context ,
3958
3969
params , dest , completionTag );
3959
3970
}
3960
-
3971
+
3972
+ if (MtmTx .isDistributed && XactIsoLevel != XACT_REPEATABLE_READ ) {
3973
+ elog (ERROR , "Isolation level %s is not supported by multimaster" , isoLevelStr [XactIsoLevel ]);
3974
+ }
3975
+
3961
3976
if (MyXactAccessedTempRel )
3962
3977
{
3963
3978
MTM_LOG1 ("Xact accessed temp table, stopping replication" );
0 commit comments