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

Commit 9975c68

Browse files
Self review of previous patch. Fix assumption that xmax >= xmin.
1 parent b9075a6 commit 9975c68

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/backend/access/heap/heapam.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3809,11 +3809,9 @@ HeapTupleHeaderAdvanceLatestRemovedXid(HeapTupleHeader tuple,
38093809
!(tuple->t_infomask & HEAP_XMIN_INVALID) &&
38103810
TransactionIdDidCommit(xmin)))
38113811
{
3812-
if (TransactionIdFollows(xmax, xmin))
3813-
{
3814-
if (TransactionIdFollows(xmax, *latestRemovedXid))
3812+
if (xmax != xmin &&
3813+
TransactionIdFollows(xmax, *latestRemovedXid))
38153814
*latestRemovedXid = xmax;
3816-
}
38173815
}
38183816

38193817
/* *latestRemovedXid may still be invalid at end */

0 commit comments

Comments
 (0)