pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Add a few entries to the tail of time mapping, to see old values
Date: Fri, 29 Apr 2016 21:57:13 +0000
Message-ID: <E1awGPR-000376-5G@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Add a few entries to the tail of time mapping, to see old values.

Without a few entries beyond old_snapshot_threshold, the lookup
would often fail, resulting in the more aggressive pruning or
vacuum being skipped often enough to matter.  This was very clearly
shown by a python test script posted by Ants Aasma, and was likely
a factor in an earlier but somewhat less clear-cut test case posted
by Jeff Janes.

This patch makes no change to the logic, per se -- it just makes
the array of mapping entries big enough to make lookup misses based
on timing much less likely.  An occasional miss is still possible
if a thread stalls for more than 10 minutes, but that does not
create any problem with correctness of behavior.  Besides, if
things are so busy that a thread is stalling for more than 10
minutes, it is probably OK to skip the more aggressive cleanup at
that particular point in time.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7c3e8039f450eb99b3a73272d0a1661195747d1b

Modified Files
--------------
src/backend/utils/time/snapmgr.c | 26 +++++++++++++-------------
src/include/utils/snapmgr.h      | 13 +++++++++++++
2 files changed, 26 insertions(+), 13 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: <E1awGPR-000376-5G@gemulon.postgresql.org>
Permalink:  ../E1awGPR-000376-5G@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1awGPR-000376-5G@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: kgrittn@postgresql.org
  Subject: Re: pgsql: Add a few entries to the tail of time mapping, to see old values
  In-Reply-To: <E1awGPR-000376-5G@gemulon.postgresql.org>
  References: <E1awGPR-000376-5G@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