pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix lazy_scan_heap so that it won't mark pages all-frozen too so
Date: Wed, 15 Jun 2016 18:31:43 +0000
Message-ID: <E1bDFbL-0002Os-Ck@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Fix lazy_scan_heap so that it won't mark pages all-frozen too soon.

Commit a892234f830e832110f63fc0a2afce2fb21d1584 added a new bit per
page to the visibility map fork indicating whether the page is
all-frozen, but incorrectly assumed that if lazy_scan_heap chose to
freeze a tuple then that tuple would not need to later be frozen
again. This turns out to be false, because xmin and xmax (and
conceivably xvac, if dealing with tuples from very old releases) could
be frozen at separate times.

Thanks to Andres Freund for help in uncovering and tracking down this
issue.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/38e9f90a227d1e60e7b4691d1a71fefaba6059e5

Modified Files
--------------
src/backend/access/heap/heapam.c  | 45 ++++++++++++++++++++++++++++-----------
src/backend/commands/vacuumlazy.c |  8 +++++--
src/include/access/heapam_xlog.h  |  3 ++-
3 files changed, 40 insertions(+), 16 deletions(-)


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


Message-ID: <E1bDFbL-0002Os-Ck@gemulon.postgresql.org>
Permalink:  ../E1bDFbL-0002Os-Ck@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1bDFbL-0002Os-Ck@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: Fix lazy_scan_heap so that it won't mark pages all-frozen too so
  In-Reply-To: <E1bDFbL-0002Os-Ck@gemulon.postgresql.org>
  References: <E1bDFbL-0002Os-Ck@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