pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: digoal@126.com
To: pgsql-bugs@postgresql.org
Subject: BUG #10155: BUG? Cann't remove new generated tuples after repeatable read transaction start.
Date: Mon, 28 Apr 2014 08:37:25 +0000
Message-ID: <20140428083725.2656.36967@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      10155
Logged by:          digoal.zhou
Email address:      digoal@126.com
PostgreSQL version: 9.3.3
Operating system:   CentOS 6.4 x64
Description:        

SESSION A : 
digoal=# begin isolation level repeatable read;
BEGIN
digoal=# \dt
                 List of relations
 Schema |         Name          | Type  |  Owner   
--------+-----------------------+-------+----------
 public | stat_pg_stat_database | table | postgres
 public | tbl_cost_align        | table | postgres
 public | test                  | table | postgres
 public | ttt                   | table | postgres
 public | tttt                  | table | postgres
 public | ttttt                 | table | postgres
(6 rows)

SESSION B : 
digoal=# create table t as select * from pg_class;
SELECT 306

SESSION A : 
no table t in it , A cann't see the t metadata in pg_class and pg_attr and
so on.
digoal=# \dt
                 List of relations
 Schema |         Name          | Type  |  Owner   
--------+-----------------------+-------+----------
 public | stat_pg_stat_database | table | postgres
 public | tbl_cost_align        | table | postgres
 public | test                  | table | postgres
 public | ttt                   | table | postgres
 public | tttt                  | table | postgres
 public | ttttt                 | table | postgres
(6 rows)

SESSION B : 
but B cann't reclaim rows from table t.
why?
i think postgresql cann't reclaim tuples already exists before repeatable
read transaction start, why this case t's tuples after session a and cann't
reclaim.


digoal=# delete from t;
DELETE 306
digoal=# vacuum freeze verbose t;
INFO:  vacuuming "public.t"
INFO:  "t": found 0 removable, 306 nonremovable row versions in 2 out of 2
pages
DETAIL:  306 dead row versions cannot be removed yet.
There were 0 unused item pointers.
0 pages are entirely empty.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
INFO:  vacuuming "pg_toast.pg_toast_33578"
INFO:  index "pg_toast_33578_index" now contains 0 row versions in 1 pages
DETAIL:  0 index row versions were removed.
0 index pages have been deleted, 0 are currently reusable.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
INFO:  "pg_toast_33578": found 0 removable, 0 nonremovable row versions in 0
out of 0 pages
DETAIL:  0 dead row versions cannot be removed yet.
There were 0 unused item pointers.
0 pages are entirely empty.
CPU 0.00s/0.00u sec elapsed 0.00 sec.
VACUUM


when SESSION end;
session b can reclaim these dead tuple.




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (4+ messages)  latest in thread

Message-ID: <20140428083725.2656.36967@wrigleys.postgresql.org>
Permalink:  ../20140428083725.2656.36967@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20140428083725.2656.36967@wrigleys.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-bugs@postgresql.org
  Cc: digoal@126.com
  Subject: Re: BUG #10155: BUG? Cann't remove new generated tuples after repeatable read transaction start.
  In-Reply-To: <20140428083725.2656.36967@wrigleys.postgresql.org>
  References: <20140428083725.2656.36967@wrigleys.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