Question about the isolation level and visible - Mailing list pgsql-general

From 娄帅
Subject Question about the isolation level and visible
Date
Msg-id CALJs9_3D+VNT6atvX5wK0OFmg4AgdMJXQLQN5ttK6qu6ZUknWg@mail.gmail.com
Whole thread Raw
Responses 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>)
List 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 by date:

Previous
From: Dave Johansen
Date:
Subject: Re: Inserting from multiple processes?
Next
From: Craig Ringer
Date:
Subject: Re: BDR: Can a node live alone after being detached