session hang for same row update

From: AI Rumman <rummandba(at)gmail(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: session hang for same row update
Date: 2011-12-01 15:10:15
Message-ID: CAGoODpdnxsSr6OtC78=SyHs+OGjb8dyZiqXOX=grFqdSK3TYUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Could anyone please tell me why the session 2 is hanging?
I am using Postgresql 9.1.

show deadlock_timeout ;
deadlock_timeout
------------------
1s
(1 row)

select * from t2;
i | nam
---+-----
2 | t4
1 | t3

Session 1:
BEGIN
update t2 set nam = 't3' where i=2;
UPDATE 1

Session 2:
BEGIN
update t2 set nam = 't3' where i=2;
hanged

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2011-12-01 15:23:25 Re: session hang for same row update
Previous Message Magnus Hagander 2011-12-01 14:55:37 Re: Streaming Replication Over SSL