File tree 1 file changed +13
-5
lines changed 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -744,11 +744,19 @@ MtmAdjustOldestXid(TransactionId xid)
744
744
} else {
745
745
oldestSnapshot = Mtm -> nodes [MtmNodeId - 1 ].oldestSnapshot ;
746
746
}
747
- for (i = 0 ; i < Mtm -> nAllNodes ; i ++ ) {
748
- if (!BIT_CHECK (Mtm -> disabledNodeMask , i )
749
- && Mtm -> nodes [i ].oldestSnapshot < oldestSnapshot )
750
- {
751
- oldestSnapshot = Mtm -> nodes [i ].oldestSnapshot ;
747
+ /*
748
+ * If there is no activity on neighbors during recovery then they will not
749
+ * advance their oldestSnapshot, so we can explode our hashes. But during
750
+ * recovery do not really need to look at oldestSnapshot of neighbors.
751
+ */
752
+ if (Mtm -> status != MTM_RECOVERY )
753
+ {
754
+ for (i = 0 ; i < Mtm -> nAllNodes ; i ++ ) {
755
+ if (!BIT_CHECK (Mtm -> disabledNodeMask , i )
756
+ && Mtm -> nodes [i ].oldestSnapshot < oldestSnapshot )
757
+ {
758
+ oldestSnapshot = Mtm -> nodes [i ].oldestSnapshot ;
759
+ }
752
760
}
753
761
}
754
762
if (oldestSnapshot > MtmVacuumDelay * USECS_PER_SEC ) {
You can’t perform that action at this time.
0 commit comments