Tomasz Zielonka <tomek(at)mult(dot)i(dot)pl> writes:
> It DOESN'T happen in PostgreSQL 7.1beta3
> It DOES happen in PostgreSQL 7.1beta4 (but on a different machine)
You shouldn't be using *any* beta version anymore. However,
'begin; select * from items; lock table items; commit;'
is deadlock-prone coding: you are first acquiring a read lock on the
items table, and then trying to upgrade to an exclusive lock. The
fact that you get deadlocks is not a Postgres bug.
regards, tom lane