]> git.ipfire.org Git - thirdparty/postgresql.git/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)
commit4cf0978ea2733548149ee7f11e588975daaf7609
tree4f0d4e27500433db2ce2c05a5349983a43d71a24
parent2e7f0c34aa6dd2f4c02f57d9dd5c37eeeb661198
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