pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fetch XIDs atomically during vac_truncate_clog().
Date: Tue, 24 May 2016 19:48:18 +0000
Message-ID: <E1b5IJO-0002PL-EW@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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>

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/5551dac59c0601b49d57a3f897fb0a6d581e58ac

Modified Files
--------------
src/backend/commands/vacuum.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (6+ messages)  latest in thread

Message-ID: <E1b5IJO-0002PL-EW@gemulon.postgresql.org>
Permalink:  ../E1b5IJO-0002PL-EW@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1b5IJO-0002PL-EW@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Fetch XIDs atomically during vac_truncate_clog().
  In-Reply-To: <E1b5IJO-0002PL-EW@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox