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

Commit 7123695

Browse files
committed
do not take vacuum workers into account during adjust oldestxmin
1 parent 42e214f commit 7123695

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

multimaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ Snapshot MtmGetSnapshot(Snapshot snapshot)
606606

607607
TransactionId MtmGetOldestXmin(Relation rel, bool ignoreVacuum)
608608
{
609-
TransactionId xmin = PgGetOldestXmin(NULL, false); /* consider all backends */
609+
TransactionId xmin = PgGetOldestXmin(rel, ignoreVacuum); /* consider all backends */
610610
if (TransactionIdIsValid(xmin)) {
611611
MtmLock(LW_EXCLUSIVE);
612612
xmin = MtmAdjustOldestXid(xmin);
@@ -971,7 +971,7 @@ static void
971971
MtmBeginTransaction(MtmCurrentTrans* x)
972972
{
973973
if (x->snapshot == INVALID_CSN) {
974-
TransactionId xmin = (Mtm->gcCount >= MtmGcPeriod) ? PgGetOldestXminNoslot(NULL, false) : InvalidTransactionId; /* Get oldest xmin outside critical section */
974+
TransactionId xmin = (Mtm->gcCount >= MtmGcPeriod) ? PgGetOldestXminNoslot(NULL, true) : InvalidTransactionId; /* Get oldest xmin outside critical section */
975975

976976
Assert(!x->isActive);
977977
MtmLock(LW_EXCLUSIVE);

0 commit comments

Comments
 (0)