Re: locking problems - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: locking problems
Date
Msg-id 20020318111414.C24566@svana.org
Whole thread Raw
In response to locking problems  ("Jonathan Ellis" <jbe@familyellis.org>)
List pgsql-general
On Sat, Mar 16, 2002 at 11:42:57AM -0800, Jonathan Ellis wrote:
> I guess I don't understand locking in PG...  I have a simple statement that
> is deadlocking:
>
> update minions set hp = hp_max
>
> there are no triggers or rules on this table.  Even when I try
>
> lock table minions in row share mode
>
> it still deadlocks.  How can a statement like this deadlock?  Doesn't it
> acquire all necessary locks atomically?

Is that the only statement in the transaction?
How many rows are there in that table?
How do you know it's deadlocking?

HTH,
--
Martijn van Oosterhout <kleptog@svana.org>   http://svana.org/kleptog/
> Ignorance continues to thrive when intelligent people choose to do
> nothing.  Speaking out against censorship and ignorance is the imperative
> of all intelligent people.

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Why is it not using an index?
Next
From: Francisco Reyes
Date:
Subject: Re: Maintainer(s) for gborg?