concurrency in psql

From: kenneth d'souza <kd_souza(at)hotmail(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: concurrency in psql
Date: 2008-01-01 13:02:42
Message-ID: BAY116-W10FBB88C888455C8C6AB7CED510@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers



Hi,
I am trying to understand concurrency and mvcc with a small example in psql.Isolation_level is read commited. There are 4 psql session by the same Role. I am executing the commands in the below sequence.

Session 1:insert into kentab values ( 1,'A');commit;
begin;update kentab set name='Ad' where id=1;
session 2: begin;update kentab set name='A2d' where id=1;
session 3: begin;update kentab set name='A3d' where id=1;

Session 1:commit;
session 4:begin; update kentab set name='A4d' where id=1;
I want to now commit in Session 3. Firstly I don't see the command prompt. Morever, despite executing commit; it is not commiting and ending before session2 or session4.I have tried Select for Update too but it is behaving the same.

Any clue what must be happening here?

Thanks,
Ken
_________________________________________________________________
Post free property ads on Yello Classifieds now! www.yello.in
http://ss1.richmedia.in/recurl.asp?pid=220

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-01-01 13:06:19 Index Page Split logging
Previous Message Warren Turkal 2007-12-30 08:40:23 question about timestamp