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