Applies on top of v2-0001 and v2-0002 upthread. Not for the CF bot. Skip xmax == xmin and MultiXact xmax in the second hint. diff --git a/src/backend/access/heap/heapam_visibility.c b/src/backend/access/heap/heapam_visibility.c --- a/src/backend/access/heap/heapam_visibility.c +++ b/src/backend/access/heap/heapam_visibility.c @@ -1191,12 +1191,15 @@ HeapTupleSatisfiesVacuumHorizon(HeapTuple htup, Buffer buffer, TransactionId *de * from an updated one. */ if (!(tuple->t_infomask & HEAP_XMAX_INVALID) && + !(tuple->t_infomask & HEAP_XMAX_IS_MULTI) && !HEAP_XMAX_IS_LOCKED_ONLY(tuple->t_infomask) && !HeapTupleHeaderIsOnlyLocked(tuple)) { TransactionId xmax = HeapTupleHeaderGetUpdateXid(tuple); - if (!TransactionIdIsInProgress(xmax) && + /* xmax == xmin: xmax is in progress too, nothing to do */ + if (!TransactionIdEquals(xmax, HeapTupleHeaderGetRawXmin(tuple)) && + !TransactionIdIsInProgress(xmax) && !TransactionIdDidCommit(xmax)) SetHintBits(tuple, buffer, HEAP_XMAX_INVALID, InvalidTransactionId);