Skip to content
Snippets Groups Projects
  • Tom Lane's avatar
    4cf0978e
    Fetch XIDs atomically during vac_truncate_clog(). · 4cf0978e
    Tom Lane authored
    Because vac_update_datfrozenxid() updates datfrozenxid and datminmxid
    in-place, it's unsafe to assume that successive reads of those values will
    give consistent results.  Fetch each one just once to ensure sane behavior
    in the minimum calculation.  Noted while reviewing Alexander Korotkov's
    patch in the same area.
    
    Discussion: <8564.1464116473@sss.pgh.pa.us>
    4cf0978e
    History
    Fetch XIDs atomically during vac_truncate_clog().
    Tom Lane authored
    Because vac_update_datfrozenxid() updates datfrozenxid and datminmxid
    in-place, it's unsafe to assume that successive reads of those values will
    give consistent results.  Fetch each one just once to ensure sane behavior
    in the minimum calculation.  Noted while reviewing Alexander Korotkov's
    patch in the same area.
    
    Discussion: <8564.1464116473@sss.pgh.pa.us>