Skip to content

Commit 3067e72

Browse files
committed
Remove unneccesary lock
1 parent b841fe6 commit 3067e72

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

contrib/multimaster/multimaster.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,13 @@ static bool TransactionIdIsInDoubt(TransactionId xid)
211211
LWLockAcquire(dtm->hashLock, LW_SHARED);
212212
inDoubt = hash_search(xid_in_doubt, &xid, HASH_FIND, NULL) != NULL;
213213
LWLockRelease(dtm->hashLock);
214+
#if 0 /* We do not need to wait until transaction locks are released, do we? */
214215
if (!inDoubt)
215216
{
216217
XLogRecPtr lsn;
217218
inDoubt = DtmGetTransactionStatus(xid, &lsn) != TRANSACTION_STATUS_IN_PROGRESS;
218219
}
220+
#endif
219221
if (inDoubt)
220222
{
221223
XTM_INFO("Wait for transaction %d to complete\n", xid);

0 commit comments

Comments
 (0)