We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent744e089 commit6761fc9Copy full SHA for 6761fc9
contrib/mmts/multimaster.c
@@ -1110,9 +1110,14 @@ MtmEndTransaction(MtmCurrentTrans* x, bool commit)
1110
}
1111
if (ts!=NULL) {
1112
if (commit) {
1113
-/* Assert(ts->status == TRANSACTION_STATUS_UNKNOWN); */
1114
-Assert(ts->status==TRANSACTION_STATUS_UNKNOWN
1115
-|| (ts->status==TRANSACTION_STATUS_IN_PROGRESS&&Mtm->status==MTM_RECOVERY));/* ??? Why there is commit without prepare */
+if (!(ts->status==TRANSACTION_STATUS_UNKNOWN
+|| (ts->status==TRANSACTION_STATUS_IN_PROGRESS&&Mtm->status==MTM_RECOVERY)))
+{
1116
+elog(ERROR,"Attempt to commit %s transaction %d (%s)",
1117
+ts->status==TRANSACTION_STATUS_ABORTED ?"aborted"
1118
+ :ts->status==TRANSACTION_STATUS_COMMITTED ?"committed" :"not prepared",
1119
+ts->xid,ts->gid);
1120
+}
1121
if (x->csn>ts->csn||Mtm->status==MTM_RECOVERY) {
1122
ts->csn=x->csn;
1123
MtmSyncClock(ts->csn);