Re: locking problems - Mailing list pgsql-general

From Jonathan Ellis
Subject Re: locking problems
Date
Msg-id 014601c1cf9f$724ad0e0$4a050a0a@jellispc
Whole thread Raw
In response to locking problems  ("Jonathan Ellis" <jbe@familyellis.org>)
List pgsql-general
> The docs say that if something is locked, the system waits
> deadlock_timeout milliseconds before trying to discover whether the
> condition can ever become unlocked.  I ran into a problem with
> deadlocks under heavy load once, and discovered that setting
> deadlock_timeout higher did just what the docs suggested: "Ideally
> the setting should exceed your typical transaction time, so as to
> improve the odds that the lock will be released before the waiter
> decides to check for deadlock."  Maybe that's your problem, too.

the thing is, it shouldn't be deadlocking, so the "check for deadlock" code
should always look at it and say, "Hmm, nope, that'll take care of itself
eventually."  So if it is deadlocking, it's a bug, and if it's whacking a
non-deadlocked transaction, that's a bug too the way I read it.

-Jonathan


pgsql-general by date:

Previous
From: "Booth, Robert"
Date:
Subject: Access to Postgres query problem
Next
From: "Jonathan Ellis"
Date:
Subject: Re: locking problems