53400ERRORTier 2 — Caution✅ HIGH confidenceconfiguration limit exceeded
What this means
SQLSTATE 53400 is raised when a configured resource limit is exceeded — for example, exceeding the maximum number of locks, shared memory segments, or other configurable resource caps.
Why it happens
- 1Exceeding max_locks_per_transaction (the maximum number of locks one transaction can hold)
- 2Exceeding other configurable resource limits defined in postgresql.conf
How to reproduce
Transaction holding more locks than max_locks_per_transaction allows.
-- A transaction that acquires locks on tens of thousands of objects:
BEGIN;
-- LOCK many tables...Fix 1: Increase max_locks_per_transaction in postgresql.conf
When a legitimate use case requires many locks.
-- In postgresql.conf:
-- max_locks_per_transaction = 256 (default is 64)Why this works
max_locks_per_transaction controls the shared lock table size. Increasing it requires a server restart.
Fix 2: Reduce the number of objects locked per transaction
When the lock count can be reduced by redesigning the operation.
Why this works
Break large operations into smaller transactions that lock fewer objects at a time.
Sources
📚 Official docs: https://www.postgresql.org/docs/current/errcodes-appendix.html
📚 Feature docs: https://www.postgresql.org/docs/current/runtime-config-locks.html
🔧 Source ref: Class 53 — Insufficient Resources
Confidence assessment
✅ HIGH confidence
Standard SQLSTATE for configuration limit exhaustion. Stable across versions.
See also
🔗 Related errors
📄 Reference pages