BUG #14361: snapshot too old bug? in xmin>=xid transaction, also raise snapshot too old error

From: digoal(at)126(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14361: snapshot too old bug? in xmin>=xid transaction, also raise snapshot too old error
Date: 2016-10-07 15:03:55
Message-ID: 20161007150355.1413.66900@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14361
Logged by: Zhou Digoal
Email address: digoal(at)126(dot)com
PostgreSQL version: 9.6.0
Operating system: CentOS 6.x x64
Description:

create table tbl1(id int);
insert into tbl1 values (1);

session a:
postgres=# begin;
BEGIN
postgres=# insert into tbl1 values (2); -- generate xid, then vacuum cann't
reclaim dead tuple after this xid.
INSERT 0 1
postgres=# with t as(select pg_sleep(100)) select * from tbl1,t; -- emulate
a long query, it will visite dirty page after this query's snapshot->lsn.

then , quick , generate a new lsn dirty page.
session b:
postgres=# update tbl1 set id=3;

-- vacuum have not reclaim the deadtuple, but session a raise error the
same.
session a:
ERROR: snapshot too old

It's not perfect.

best regards,
digoal
```

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kevin Grittner 2016-10-07 21:10:57 Re: BUG #14360: snapshot too old bug? cann't reclaim dead tuple after has only xmin's transaction.
Previous Message digoal 2016-10-07 14:54:13 BUG #14360: snapshot too old bug? cann't reclaim dead tuple after has only xmin's transaction.