]> granicus.if.org Git - postgresql/commit
Fetch XIDs atomically during vac_truncate_clog().
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 24 May 2016 19:47:51 +0000 (15:47 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 24 May 2016 19:47:51 +0000 (15:47 -0400)
commitbbbe2c97eba37fd8a9e580a596f48935f3d9ded8
tree5a034c273f71e494c6f7365bd2b4296d0d3b8797
parenta34c3dd50f661126ac51c794e63f7932fe657542
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