Self review of previous patch. Fix assumption that xmax >= xmin.
authorSimon Riggs <simon@2ndQuadrant.com>
Thu, 9 Dec 2010 10:20:49 +0000 (10:20 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Thu, 9 Dec 2010 10:20:49 +0000 (10:20 +0000)
src/backend/access/heap/heapam.c

index cfbbc6301e3daba23bd885373c7f7af214369d6e..4fe3a7391090d6d3a6826d4601f04c603c21718b 100644 (file)
@@ -3809,11 +3809,9 @@ HeapTupleHeaderAdvanceLatestRemovedXid(HeapTupleHeader tuple,
                 !(tuple->t_infomask & HEAP_XMIN_INVALID) &&
                 TransactionIdDidCommit(xmin)))
        {
-               if (TransactionIdFollows(xmax, xmin))
-               {
-                       if (TransactionIdFollows(xmax, *latestRemovedXid))
+               if (xmax != xmin &&
+                       TransactionIdFollows(xmax, *latestRemovedXid))
                                *latestRemovedXid = xmax;
-               }
        }
 
        /* *latestRemovedXid may still be invalid at end */