Tom Lane <> wrote:
> You didn't tell us exactly what the FK relationship is
The original post has an attachment with a self-contained example,
starting with table creation.
> I suspect the reason for the deadlock is that one process is
> trying to update a row that references some row already updated by
> the other.
The surprising thing is that a particular row is (using the
identifiers from the attachment):
Process 2 updates a particular row without blocking.
Process 1 updates the same row, which blocks.
Process 2 updates the same row again (with *exactly* the same UPDATE
statement), which fails with a deadlock.
I'm not sure I consider that a bug, but it moves the needle on the
astonishment meter.

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to