Re: Question about conccurrency control and Insert - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Question about conccurrency control and Insert
Date
Msg-id 20030910073142.I64012-100000@megazone.bigpanda.com
Whole thread Raw
In response to Question about conccurrency control and Insert  (Stéphane Cazeaux <stephane.cazeaux@netcentrex.net>)
List pgsql-general
On Wed, 10 Sep 2003, [ISO-8859-1] St�phane Cazeaux wrote:

> So my question is : why the SELECT...FOR UPDATE of client 2, when
> unblocked, returns only one row, and a following SELECT in the same
> transaction returns two rows ? Is there a mechanisme I don't understand ?

From the docs:

Read Committed is the default isolation level in PostgreSQL. When a
transaction runs on this isolation level, a SELECT query sees only data
committed before the query began; it never sees either uncommitted data or
changes committed during query execution by concurrent transactions....
Notice that two successive SELECT commands can see different data, even
though they are within a single transaction, if other transactions commit
changes during execution of the first SELECT.
UPDATE, DELETE and SELECT FOR UPDATE commangs behave the same as SELECT in
terms of searching for target rows: they will only find target rows that
were committed as of the command start time.


pgsql-general by date:

Previous
From: Dennis Gearon
Date:
Subject: Re: Picture with Postgres and Delphi
Next
From: Tom Lane
Date:
Subject: Re: Question about conccurrency control and Insert