Re: snapshot too old, configured by time

From: Thom Brown <thom(at)linux(dot)com>
To: Kevin Grittner <kgrittn(at)gmail(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Steve Singer <steve(at)ssinger(dot)info>, Kevin Grittner <kgrittn(at)ymail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: snapshot too old, configured by time
Date: 2016-03-21 19:21:56
Message-ID: CAA-aLv5r3QXCU44qLt88cTcnGOqGxPTsLBM7S-pndkQ3RmG=yA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17 March 2016 at 21:15, Kevin Grittner <kgrittn(at)gmail(dot)com> wrote:
> New patch just to merge in recent commits -- it was starting to
> show some bit-rot. Tests folded in with main patch.

In session 1, I've run:

# begin transaction isolation level repeatable read ;
BEGIN

*# declare stuff scroll cursor for select * from test where num between 5 and 9;
DECLARE CURSOR

*# fetch forward 5 from stuff;
id | num | thing
-----+-----+------------------------------------
2 | 8 | hellofji djf odsjfiojdsif ojdsiof
3 | 7 | hellofji djf odsjfiojdsif ojdsiof
112 | 9 | hellofji djf odsjfiojdsif ojdsiof
115 | 6 | hellofji djf odsjfiojdsif ojdsiof
119 | 8 | hellofji djf odsjfiojdsif ojdsiof
(5 rows)

In session 2, over a min later:

# update test set num = 12 where num between 5 and 9 and id between 120 and 250;
ERROR: snapshot too old

Then back to session 1:

*# fetch forward 5 from stuff;
ERROR: snapshot too old

Should session 2 be getting that error?

Thom

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2016-03-21 19:25:57 Re: Request - repeat value of \pset title during \watch interations
Previous Message Tom Lane 2016-03-21 19:11:59 Re: Request - repeat value of \pset title during \watch interations