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
```