Notice: We've updated our Privacy Policy, effective November 14, 2024.

L73: Deadlock detected (transaction rolled back)

Work in Progress

This documentation page is currently being worked on. We apologize for the page being incomplete or not available yet.

Category: Lock Events
SQLSTATE: 40P01 (Class 40 - Transaction Rollback: deadlock_detected)
Urgency: medium

Example Postgres Log Output:

LOG: process 123 detected deadlock while waiting for AccessExclusiveLock on extension of relation 666 of database 123 after 456.000 ms
ERROR: deadlock detected
DETAIL: Process 9788 waits for ShareLock on transaction 1035; blocked by process 91.
Process 91 waits for ShareLock on transaction 1045; blocked by process 98.
Process 98: INSERT INTO x (id, name, email) VALUES (1, 'ABC', 'abc@example.com') ON CONFLICT(email) DO UPDATE SET name = excluded.name, /* truncated */
Process 91: INSERT INTO x (id, name, email) VALUES (1, 'ABC', 'abc@example.com') ON CONFLICT(email) DO UPDATE SET name = excluded.name, /* truncated */"
HINT: See server log for query details.
CONTEXT: while inserting index tuple (1,42) in relation "x"
STATEMENT: INSERT INTO x (id, name, email) VALUES (1, 'ABC', 'abc@example.com') ON CONFLICT(email) DO UPDATE SET name = excluded.name RETURNING id

Explanation:

...

Recommended Action:

...

Learn More:

No additional resources available.


Download Free eBook: The Top 6 Postgres Log Events
Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →