public inbox for [email protected]  
help / color / mirror / Atom feed
From: zhangjinyu <[email protected]>
To: [email protected]
Subject: Re: BUG #13541: There is a visibility issue when run some DDL and Query. The time window is very shot
Date: Fri, 14 Aug 2015 04:45:34 -0700 (MST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAJrrPGd--dTUoRpwiSmNVpa56sbCMMB-xB4=Qc4um1NNnt4uhQ@mail.gmail.com>
References: <[email protected]>
	<CAJrrPGd--dTUoRpwiSmNVpa56sbCMMB-xB4=Qc4um1NNnt4uhQ@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-bugs>

The test cases is not clear in last mail,  the following shows all test
cases.
1. Table precondition  
create table t(c1 int);
create table t2(c1 int):
insert into t values(1),(2),(3);
select xmin from t ;   (xmin=10043)
2. Step1: 
   session1:  begin transaction isolation level repeatable read;
                 select * from t2;   (query on other table only for get
snapshot)
   Step2:
  session2: alter table t alter c1 set data type char(10);
               select xmin from t;   (new xid)
   Step3:
  session1:  select xmin from t;       (you can see 0 row, because the
snapshot is the same as the first query when transaction isolation level is
repeatable read.)

The DDL query(alter ...set data type ) rewrites all tuples with new
transaction xid,  so if the transaction isolation level is repeatable read,
that will cause wrong result.   Which DDL query rewrite all tuples with new
xid?
                                                                



--
View this message in context: http://postgresql.nabble.com/BUG-13541-There-is-a-visibility-issue-when-run-some-DDL-and-Query-The-t...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.


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



view thread (4+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: BUG #13541: There is a visibility issue when run some DDL and Query. The time window is very shot
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox