Re: Deadlock? idle in transaction - Mailing list pgsql-hackers

From Michael Meskes
Subject Re: Deadlock? idle in transaction
Date
Msg-id 20011012103409.E1945@feivel.credativ.de
Whole thread Raw
In response to Re: Deadlock? idle in transaction  (Rachit Siamwalla <rachit@ensim.com>)
List pgsql-hackers
On Thu, Oct 11, 2001 at 03:15:36PM -0700, Rachit Siamwalla wrote:
> then gets stuck on a table that the transaction has modified. Now most of
> your other transactions will block forever. Then the connection limit for
> postgres will be hit. Then you can't connect to postgres at all.

Really? I do not know the way the backend handles locks, but couldn't it
detect such a deadlock and cancel a transaction? Something like this:

task 1 locks table A
task 2 locks table B
task 1 locks table B
task 2 tries to lock table A

Of course the last call creates the deadlock. Would it be possible to just
cancel task 2 in this case? Or do I miss something obvious?

Michael

-- 
Michael Meskes
Michael@Fam-Meskes.De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!


pgsql-hackers by date:

Previous
From: "Balaji Venkatesan"
Date:
Subject: Interchange
Next
From: Lee Kindness
Date:
Subject: Re: ecpg - GRANT bug