@@ -664,6 +664,15 @@ MtmResetTransaction(MtmCurrentTrans* x)
664664x -> status = TRANSACTION_STATUS_UNKNOWN ;
665665}
666666
667+
668+ static const char * const isoLevelStr []=
669+ {
670+ "read uncommitted" ,
671+ "read committed" ,
672+ "repeatable read" ,
673+ "serializable"
674+ };
675+
667676static void
668677MtmBeginTransaction (MtmCurrentTrans * x )
669678{
@@ -680,13 +689,16 @@ MtmBeginTransaction(MtmCurrentTrans* x)
680689x -> isPrepared = false;
681690x -> isTransactionBlock = IsTransactionBlock ();
682691/* Application name can be changed usnig PGAPPNAME environment variable */
683- if (! IsBackgroundWorker && x -> isDistributed && Mtm -> status != MTM_ONLINE && strcmp (application_name ,MULTIMASTER_ADMIN )!= 0 ) {
692+ if (x -> isDistributed && Mtm -> status != MTM_ONLINE && strcmp (application_name ,MULTIMASTER_ADMIN )!= 0 ) {
684693/* Reject all user's transactions at offline cluster.
685694 * Allow execution of transaction by bg-workers to make it possible to perform recovery.
686695 */
687696MtmUnlock ();
688697elog (ERROR ,"Multimaster node is not online: current status %s" ,MtmNodeStatusMnem [Mtm -> status ]);
689698}
699+ if (x -> isDistributed && XactIsoLevel != XACT_REPEATABLE_READ ) {
700+ elog (LOG ,"Isolation level %s is not supported by multimaster" ,isoLevelStr [XactIsoLevel ]);
701+ }
690702x -> containsDML = false;
691703x -> snapshot = MtmAssignCSN ();
692704x -> gtid .xid = InvalidTransactionId ;
@@ -2164,6 +2176,13 @@ _PG_init(void)
21642176NULL
21652177);
21662178
2179+ if (DefaultXactIsoLevel != XACT_REPEATABLE_READ ) {
2180+ elog (ERROR ,"Multimaster requires repeatable read default isolation level" );
2181+ }
2182+ if (synchronous_commit != SYNCHRONOUS_COMMIT_ON ) {
2183+ elog (ERROR ,"Multimaster requires synchronous commit on" );
2184+ }
2185+
21672186MtmSplitConnStrs ();
21682187MtmStartReceivers ();
21692188