From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fetch XIDs atomically during vac_truncate_clog(). |
Date: | 2016-05-24 19:48:18 |
Message-ID: | E1b5IJO-0002PJ-ES@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-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(dot)1464116473(at)sss(dot)pgh(dot)pa(dot)us>
Branch
------
REL9_2_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/4cf0978ea2733548149ee7f11e588975daaf7609
Modified Files
--------------
src/backend/commands/vacuum.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2016-05-24 19:48:35 | Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold < |
Previous Message | Tom Lane | 2016-05-24 19:20:49 | pgsql: Avoid consuming an XID during vac_truncate_clog(). |