Question about the isolation level and visible

Поиск
Список
Период
Сортировка
От 娄帅
Тема Question about the isolation level and visible
Дата
Msg-id CALJs9_3D+VNT6atvX5wK0OFmg4AgdMJXQLQN5ttK6qu6ZUknWg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Question about the isolation level and visible  (Xiang Gan <XiangGan@santaitech.com>)
Re: Question about the isolation level and visible  (Kevin Grittner <kgrittn@ymail.com>)
Список pgsql-general
Hi, all,

I start two session with the following execute time order:


session1:  START TRANSACTION ISOLATION LEVEL SERIALIZABLE;

session2: INSERT INTO t1 values(1); 
session2: COMMIT;

session1: SELECT * FROM t1;

I found session1 got the value 1 which is inserted by session2.

Is there any way to make session1 not see the value session2 inserted?

For mysql, I know there is a syntax: 
START TRANSACTION WITH CONSISTENT SNAPSHOT.

I search the PG START syntax, but found none.

Any idea will be appreciated! 

В списке pgsql-general по дате отправления:

Предыдущее
От: Dave Johansen
Дата:
Сообщение: Re: Inserting from multiple processes?
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: BDR: Can a node live alone after being detached