Read Committed transaction with long query

From: Durumdara <durumdara(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Read Committed transaction with long query
Date: 2011-05-11 16:37:50
Message-ID: BANLkTinKPe3t48c446o2z3LyWwTn2TkaMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

Two table:
Main
Lookup

The query is:
select Main.*, Lookup.Name
left join Lookup on (Main.Type_ID = Lookup.ID)

Lookup:
ID Name
1 Value1
2 Value 2
3 Value 3

Many records is in Main table (for example 1 million).

What happens in this case (C = connection):

C1.) begin read committed
C1.) starting this query
C1.) query running
C2.) begin read committed
C2.) update Lookup set Name = "New2" where ID = 2
C2.) commit
C1.) query running
C1.) query finished

Is it possible to the first joins (before C2 modifications) are
containing "Value2" on the beginning of the query and "New2" on the
end of the query?
So is it possible to the long query is containing not consistent state
because of C2's changing? For example mixing "Value2" and "New2"?

Thanks for your help!

Regards:
dd

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2011-05-11 17:42:44 Re: full text search to_tsquery performance with ispell dictionary
Previous Message Tom Lane 2011-05-11 15:56:00 Re: Regexp match not working.. (SQL help)