@@ -1025,7 +1025,7 @@ MtmBeginTransaction(MtmCurrentTrans* x)
1025
1025
1026
1026
MtmUnlock ();
1027
1027
1028
- MTM_LOG3 ("%d: MtmLocalTransaction: %s transaction %u uses local snapshot %llu" ,
1028
+ MTM_LOG3 ("%d: MtmLocalTransaction: %s transaction " XID_FMT " uses local snapshot %llu" ,
1029
1029
MyProcPid , x -> isDistributed ? "distributed" : "local" , x -> xid , x -> snapshot );
1030
1030
} else {
1031
1031
Assert (MtmInsideTransaction );
@@ -1166,8 +1166,9 @@ MtmPrePrepareTransaction(MtmCurrentTrans* x)
1166
1166
1167
1167
MtmTransactionListAppend (ts );
1168
1168
MtmAddSubtransactions (ts , subxids , ts -> nSubxids );
1169
- MTM_LOG3 ("%d: MtmPrePrepareTransaction prepare commit of %d (gtid.xid=%d, gtid.node=%d, CSN=%lld)" ,
1170
- MyProcPid , x -> xid , ts -> gtid .xid , ts -> gtid .node , ts -> csn );
1169
+ MTM_LOG3 ("%d: MtmPrePrepareTransaction prepare commit of "
1170
+ XID_FMT " (gtid.xid=" XID_FMT ", gtid.node=%d, CSN=%lld)" ,
1171
+ MyProcPid , x -> xid , ts -> gtid .xid , ts -> gtid .node , ts -> csn );
1171
1172
MtmUnlock ();
1172
1173
MTM_TXTRACE (x , "PrePrepareTransaction Finish" );
1173
1174
}
@@ -1363,7 +1364,7 @@ Mtm2PCVoting(MtmCurrentTrans* x, MtmTransState* ts)
1363
1364
}
1364
1365
}
1365
1366
x -> status = ts -> status ;
1366
- MTM_LOG3 ("%d: Result of vote: %d " , MyProcPid , MtmTxnStatusMnem [ts -> status ]);
1367
+ MTM_LOG3 ("%d: Result of vote: %s " , MyProcPid , MtmTxnStatusMnem [ts -> status ]);
1367
1368
}
1368
1369
1369
1370
static void MtmStopTransaction (void )
@@ -1394,7 +1395,7 @@ MtmPostPrepareTransaction(MtmCurrentTrans* x)
1394
1395
ts = (MtmTransState * )hash_search (MtmXid2State , & x -> xid , HASH_FIND , NULL );
1395
1396
Assert (ts != NULL );
1396
1397
if (!MtmIsCoordinator (ts ) || Mtm -> status == MTM_RECOVERY ) {
1397
- MTM_LOG3 ("Preparing transaction %d (%s) at %lld" , x -> xid , x -> gid , MtmGetCurrentTime ());
1398
+ MTM_LOG3 ("Preparing transaction " XID_FMT " (%s) at %lld" , x -> xid , x -> gid , MtmGetCurrentTime ());
1398
1399
Assert (x -> gid [0 ]);
1399
1400
ts -> votingCompleted = true;
1400
1401
if (Mtm -> status != MTM_RECOVERY /* || Mtm->recoverySlot != MtmReplicationNodeId*/ ) {
@@ -1487,7 +1488,7 @@ MtmPreCommitPreparedTransaction(MtmCurrentTrans* x)
1487
1488
// return;
1488
1489
// }
1489
1490
1490
- MTM_LOG3 ("Commit prepared transaction %d with gid='%s'" , x -> xid , x -> gid );
1491
+ MTM_LOG3 ("Commit prepared transaction " XID_FMT " with gid='%s'" , x -> xid , x -> gid );
1491
1492
ts = tm -> state ;
1492
1493
1493
1494
Assert (MtmIsCoordinator (ts ));
@@ -1608,7 +1609,8 @@ MtmEndTransaction(MtmCurrentTrans* x, bool commit)
1608
1609
}
1609
1610
if (ts != NULL ) {
1610
1611
if (* ts -> gid )
1611
- MTM_LOG2 ("TRANSLOG: %s transaction gid=%s xid=%d node=%d dxid=%d status %s" ,
1612
+ MTM_LOG2 ("TRANSLOG: %s transaction gid=%s xid=" XID_FMT
1613
+ " node=%d dxid=" XID_FMT " status %s" ,
1612
1614
(commit ? "commit" : "rollback" ), ts -> gid , ts -> xid , ts -> gtid .node , ts -> gtid .xid , MtmTxnStatusMnem [ts -> status ]);
1613
1615
if (commit ) {
1614
1616
if (!(ts -> status == TRANSACTION_STATUS_UNKNOWN
@@ -1901,7 +1903,7 @@ void MtmJoinTransaction(GlobalTransactionId* gtid, csn_t globalSnapshot, nodemas
1901
1903
1902
1904
void MtmSetCurrentTransactionGID (char const * gid )
1903
1905
{
1904
- MTM_LOG3 ("Set current transaction xid=%d GID %s" , MtmTx .xid , gid );
1906
+ MTM_LOG3 ("Set current transaction xid=" XID_FMT " GID %s" , MtmTx .xid , gid );
1905
1907
strcpy (MtmTx .gid , gid );
1906
1908
MtmTx .isDistributed = true;
1907
1909
MtmTx .isReplicated = true;
@@ -2133,8 +2135,8 @@ MtmPollStatusOfPreparedTransactions(bool majorMode)
2133
2135
}
2134
2136
}
2135
2137
} else {
2136
- MTM_LOG2 ("Skip prepared transaction %s (%d ) with status %s gtid.node=%d gtid.xid=%llu votedMask=%llx" ,
2137
- ts -> gid , ( long64 ) ts -> xid , MtmTxnStatusMnem [ts -> status ], ts -> gtid .node , (long64 )ts -> gtid .xid , ts -> votedMask );
2138
+ MTM_LOG2 ("Skip prepared transaction %s (" XID_FMT " ) with status %s gtid.node=%d gtid.xid=%llu votedMask=%llx" ,
2139
+ ts -> gid , ts -> xid , MtmTxnStatusMnem [ts -> status ], ts -> gtid .node , (long64 )ts -> gtid .xid , ts -> votedMask );
2138
2140
}
2139
2141
}
2140
2142
}
@@ -2236,8 +2238,11 @@ void MtmCheckRecoveryCaughtUp(int nodeId, lsn_t slotLSN)
2236
2238
BIT_SET (Mtm -> originLockNodeMask , nodeId - 1 ); // XXXX: log that
2237
2239
} else {
2238
2240
MTM_LOG2 ("Continue recovery of node %d, slot position %llx, WAL position %llx,"
2239
- " WAL sender position %llx, lockers %llx, active transactions %d" , nodeId , slotLSN ,
2240
- walLSN , MyWalSnd -> sentPtr , Mtm -> orinLockNodeMask , Mtm -> nActiveTransactions );
2241
+ " WAL sender position %llx, lockers %llx, active transactions %d" ,
2242
+ nodeId , (long long unsigned int ) slotLSN ,
2243
+ (long long unsigned int ) walLSN ,
2244
+ (long long unsigned int ) MyWalSnd -> sentPtr ,
2245
+ Mtm -> originLockNodeMask , Mtm -> nActiveTransactions );
2241
2246
}
2242
2247
}
2243
2248
MtmUnlock ();
@@ -3999,7 +4004,9 @@ void MtmBeginSession(int nodeId)
3999
4004
void MtmEndSession (int nodeId , bool unlock )
4000
4005
{
4001
4006
if (replorigin_session_origin != InvalidRepOriginId ) {
4002
- MTM_LOG2 ("%d: Begin reset replorigin session for node %d: %d, progress %llx" , MyProcPid , nodeId , replorigin_session_origin , replorigin_session_get_progress (false));
4007
+ MTM_LOG2 ("%d: Begin reset replorigin session for node %d: %d, progress %llx" ,
4008
+ MyProcPid , nodeId , replorigin_session_origin ,
4009
+ (long long unsigned int ) replorigin_session_get_progress (false));
4003
4010
replorigin_session_origin = InvalidRepOriginId ;
4004
4011
replorigin_session_origin_lsn = INVALID_LSN ;
4005
4012
replorigin_session_origin_timestamp = 0 ;
@@ -5676,7 +5683,9 @@ MtmSerializeLock(PROCLOCK* proclock, void* arg)
5676
5683
{
5677
5684
if ((proclock -> holdMask & LOCKBIT_ON (lm )) && (conflictMask & LOCKBIT_ON (lm )))
5678
5685
{
5679
- MTM_LOG3 ("%d: %u(%u) waits for %u(%u)" , MyProcPid , srcPgXact -> xid , proc -> pid , dstPgXact -> xid , proclock -> tag .myProc -> pid );
5686
+ MTM_LOG3 ("%d: " XID_FMT "(%u) waits for " XID_FMT "(%u)" ,
5687
+ MyProcPid , srcPgXact -> xid , proc -> pid ,
5688
+ dstPgXact -> xid , proclock -> tag .myProc -> pid );
5680
5689
MtmGetGtid (dstPgXact -> xid , & gtid ); /* transaction holding lock */
5681
5690
ByteBufferAppend (buf , & gtid , sizeof (gtid ));
5682
5691
break ;
0 commit comments