Fetch XIDs atomically during vac_truncate_clog().
authorTom Lane
Tue, 24 May 2016 19:47:51 +0000 (15:47 -0400)
committerTom Lane
Tue, 24 May 2016 19:47:51 +0000 (15:47 -0400)
commitedd8873ffede137e7af9cba5073ebb218e29704b
tree3431d36109852d78daf709ee85eccf62db961887
parentdefe936ef81d6f785a895ec5b35d480b24cf29fe
Fetch XIDs atomically during vac_truncate_clog().

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>
src/backend/commands/vacuum.c