Re: Correcting freeze conflict horizon calculation - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Correcting freeze conflict horizon calculation
Date
Msg-id CAH2-WznOen7eL_Gx1nBGkvCVP+45FshTw-vmUXWYTJJQ=uRy4A@mail.gmail.com
Whole thread Raw
In response to Re: Correcting freeze conflict horizon calculation  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
On Fri, May 30, 2025 at 5:57 PM Melanie Plageman
<melanieplageman@gmail.com> wrote:
> I don't see how OldestXmin comes into play with the visibility_cutoff_xid.

Code in heap_page_is_all_visible() (and other place, I guess the other
one is in pruneheap.c now) have a separate OldestXmin test:

/*
 * The inserter definitely committed. But is it old enough
 * that everyone sees it as committed?
 */
xmin = HeapTupleHeaderGetXmin(tuple.t_data);
if (!TransactionIdPrecedes(xmin,
                           vacrel->cutoffs.OldestXmin))
{
    all_visible = false;
    *all_frozen = false;
    break;
}

Once we "break" here, it doesn't matter what visibility_cutoff_xid has
been set to. It cannot be used for any purpose.

--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Correcting freeze conflict horizon calculation
Next
From: Greg Sabino Mullane
Date:
Subject: Re: POC: Carefully exposing information without authentication