]> 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)
commitff98ae908bbfd950e98099c653380b9cd0ac2739
tree5a42222964fb37d25df52fdfd183cac9944868ca
parent9f3e4c8131886ffb1f382d4ef8e76caa965983f4
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