Re: BUG #13541: There is a visibility issue when run some DDL and Query. The time window is very shot
| От | zhangjinyu |
|---|---|
| Тема | Re: BUG #13541: There is a visibility issue when run some DDL and Query. The time window is very shot |
| Дата | |
| Msg-id | 1439552734803-5862147.post@n5.nabble.com обсуждение исходный текст |
| Ответ на | Re: BUG #13541: There is a visibility issue when run some DDL and Query. The time window is very shot (Haribabu Kommi <kommi.haribabu@gmail.com>) |
| Ответы |
Re: Re: BUG #13541: There is a visibility issue when run some DDL and Query. The time window is very shot
|
| Список | pgsql-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-time-window-is-very-shot-tp5861304p5862147.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
В списке pgsql-bugs по дате отправления: