Skip to main content
SQLSTATE 40001

PostgreSQL serialization_failure

A serializable or repeatable-read transaction could not complete without violating the isolation guarantee.

PostgreSQL transaction managerConcurrencywarning
Exact message
ERROR: could not serialize access due to concurrent update

Also searched as: serialization_failure · could not serialize access

What it means

The database intentionally aborted the transaction because its concurrent history could not be accepted at the requested isolation level. Correct applications retry the complete transaction using fresh reads.

Typical trigger conditions

  • Concurrent changes to the same logical records
  • Serializable read/write dependency cycles
  • Hot counters or allocation rows
  • A retry that repeats only the last statement instead of the transaction
Evidence before intervention

First diagnostic checks

1

Confirm the isolation level

Establish whether the session uses repeatable read or serializable.

SHOW transaction_isolation;
2

Measure retry frequency

Occasional conflicts may be expected; sustained rates indicate a contention or transaction-design problem.

3

Retry the whole transaction

Start again from BEGIN with bounded backoff because prior reads may no longer be valid.

Version and platform notes

Serializable Snapshot Isolation behaviour described here applies to modern PostgreSQL releases; consult the deployed version documentation.

Engineering signal

Follow PostgreSQL failures and fixes

One useful weekly email with new error references, tools, integration notes and production lessons. No daily noise.