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

Commit a4ca34c

Browse files
committed
Repeat getting global transaction status from arbiter until success during recovery.
1 parent 517d806 commit a4ca34c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

contrib/pg_dtm/pg_dtm.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,10 @@ static void DtmSetTransactionStatus(TransactionId xid, int nsubxids, Transaction
681681
}
682682
else
683683
{
684-
XidStatus gs;
685-
gs = DtmGlobalGetTransStatus(xid, false);
684+
XidStatus gs = -1;
685+
while (gs == -1) {
686+
gs = DtmGlobalGetTransStatus(xid, true);
687+
}
686688
if (gs != TRANSACTION_STATUS_UNKNOWN) {
687689
status = gs;
688690
}

0 commit comments

Comments
 (0)