Re: locking problems

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: PostgreSQL general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: locking problems
Date: 2002-03-19 15:28:42
Message-ID: 20020319102842.B13958@mail.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Mar 17, 2002 at 08:54:18PM -0800, Jonathan Ellis wrote:

> > something on the table. Postgres has a deadlock_timeout feature
> > which is there to prevent clients from waiting forever. What's yours
> > set at? Maybe you just need to set it higher.
>
> I haven't changed this from the default (~20 seconds?). Is it a strict
> first-in-first-out queue? Because there's a lot of other transactions
> trying to update smaller portions of this table that seem to be cutting in
> front of the line for the lock so to speak.

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.

A

--
----
Andrew Sullivan 87 Mowat Avenue
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M6K 3E3
+1 416 646 3304 x110

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Carsten Zerbst 2002-03-19 15:32:52 Reference pg_user ?
Previous Message Tom Lane 2002-03-19 15:18:32 Re: multiple counts using CASE