Re: Deadlock? idle in transaction

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Deadlock? idle in transaction
Date: 2001-10-12 08:34:09
Message-ID: 20011012103409.E1945@feivel.credativ.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)Fam-Meskes(dot)De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2001-10-12 08:40:39 Re: Deadlock? idle in transaction
Previous Message Michael Meskes 2001-10-12 08:31:00 Re: Deadlock? idle in transaction