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

Commit 5766228

Browse files
committed
Fix Xmax freeze conditions
I broke this in 0ac5ad5; previously, freezing a tuple marked with an IS_MULTI xmax was not necessary. Per brokenness report from Jeff Janes.
1 parent 335c5e9 commit 5766228

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/backend/access/heap/heapam.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -5113,10 +5113,11 @@ heap_freeze_tuple(HeapTupleHeader tuple, TransactionId cutoff_xid,
51135113
* cutoff; it doesn't remove dead members of a very old multixact.
51145114
*/
51155115
xid = HeapTupleHeaderGetRawXmax(tuple);
5116-
if (TransactionIdIsNormal(xid) &&
5117-
(((!(tuple->t_infomask & HEAP_XMAX_IS_MULTI) &&
5118-
TransactionIdPrecedes(xid, cutoff_xid))) ||
5119-
MultiXactIdPrecedes(xid, cutoff_multi)))
5116+
if ((tuple->t_infomask & HEAP_XMAX_IS_MULTI) ?
5117+
(MultiXactIdIsValid(xid) &&
5118+
MultiXactIdPrecedes(xid, cutoff_multi)) :
5119+
(TransactionIdIsNormal(xid) &&
5120+
TransactionIdPrecedes(xid, cutoff_xid)))
51205121
{
51215122
HeapTupleHeaderSetXmax(tuple, InvalidTransactionId);
51225123

0 commit comments

Comments
 (0)