Re: Question about behavior of snapshot too old feature - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Question about behavior of snapshot too old feature
Date
Msg-id 20161019150406.GF5087@momjian.us
Whole thread Raw
In response to Re: Question about behavior of snapshot too old feature  (Kevin Grittner <kgrittn@gmail.com>)
Responses Re: Question about behavior of snapshot too old feature
List pgsql-hackers
On Mon, Oct 17, 2016 at 08:04:43AM -0500, Kevin Grittner wrote:
> > We have regression test for this feature but it sets
> > old_snapshot_threshold = 0, I doubt about we can test it properly.
> > Am I missing something?
> 
> This is a hard feature to test properly, and certainly hard to test
> without the test running for a long time.  The zero setting is
> really not intended to be used in production, but only to allow
> some half-way decent testing that doesn't take extreme lengths of
> time.  If you add some delays of a few minutes each at key points
> in a test, you should be able to get a test that works with a
> setting of 1min.  It is not impossible that we might need to add a
> memory barrier to one or two places to get such tests to behave
> consistently, but I have not been able to spot where, if anywhere,
> that would be.

Slide 10 of this presentation has an example showing
old_snapshot_threshold set to '1min':
http://momjian.us/main/writings/pgsql/features.pdf

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: emergency outage requiring database restart
Next
From: Robert Haas
Date:
Subject: Re: Transactions involving multiple postgres foreign servers