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.