Skip site navigation (1) Skip section navigation (2)

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 (view raw or whole thread)
Lists: pgsql-hackers
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?
Post free property ads on Yello Classifieds now!


pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group