Fetch XIDs atomically during vac_truncate_clog().

Tom Lane <tgl@sss.pgh.pa.us>

Commit: ff98ae908bbfd950e98099c653380b9cd0ac2739
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2016-05-24T19:47:51Z
Releases: 9.3.14
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>

Files

PathChange+/−
src/backend/commands/vacuum.c modified +18 −10