PostgreSQL Error Reference

Every error, explained

SQLSTATE codes, condition names, root causes, diagnostic queries, and recovery steps — structured for engineers running PostgreSQL in production.

578 errors documentedFree diagnostics on every pageAll PG versions covered

Showing 480 of 578 errors

54001 ERROR

stack depth limit exceeded — 54001

statement_too_complex

PostgreSQL error "stack depth limit exceeded — 54001" (SQLSTATE 54001): what it means, common causes, and how to fix it.

Program Limit Exceeded
54001 ERROR

Statement Too Complex — SQLSTATE 54001

statement_too_complex

The statement is too complex to process.

Program Limit Exceeded
54011 ERROR

Too Many Columns — SQLSTATE 54011

too_many_columns

A table or result has too many columns.

Program Limit Exceeded
54011 ERROR

tables can have at most 1600 columns — 54011

too_many_columns

PostgreSQL error "tables can have at most 1600 columns — 54011" (SQLSTATE 54011): what it means, common causes, and how to fix it.

Program Limit Exceeded
54023 ERROR

Too Many Arguments — SQLSTATE 54023

too_many_arguments

SQLSTATE 54023 (too_many_arguments): A hard internal limit was exceeded (columns, arguments, or statement size).

Program Limit Exceeded
55000 ERROR

Object Not In Prerequisite State — SQLSTATE 55000

object_not_in_prerequisite_state

The object is not in a state that permits the operation.

Object Not In Prerequisite State
55000 ERROR

materialized view “…” has not been populated — 55000

object_not_in_prerequisite_state

PostgreSQL error "materialized view "…" has not been populated" (SQLSTATE 55000): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55000 ERROR

could not create unique index “…” — 55000

object_not_in_prerequisite_state

PostgreSQL error "could not create unique index … — 55000" (SQLSTATE 55000): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55006 ERROR

cannot ALTER TABLE “…” because it has pending trigger events — 55006

object_in_use

PostgreSQL error "cannot ALTER TABLE "…" because it has pending trigger events" (SQLSTATE 55006): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55006 ERROR

database “…” is being accessed by other users — 55006

object_in_use

PostgreSQL error "database "…" is being accessed by other users" (SQLSTATE 55006): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55006 ERROR

replication slot “…” is active for PID N — 55006

object_in_use

PostgreSQL error "replication slot … is active for PID N — 55006" (SQLSTATE 55006): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55006 ERROR

Object In Use — SQLSTATE 55006

object_in_use

The operation cannot proceed because the object is currently in use.

Object Not In Prerequisite State
55006 ERROR

database “…” is being accessed by other users — 55006

object_in_use

PostgreSQL error "database … is being accessed by other users — 55006" (SQLSTATE 55006): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55006 ERROR

cannot drop the currently open database — 55006

object_in_use

PostgreSQL error "cannot drop the currently open database" (SQLSTATE 55006): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55P02 ERROR

parameter “…” cannot be changed without restarting the server — 55P02

cant_change_runtime_param

PostgreSQL error "parameter … cannot be changed without restarting the server — 55P02" (SQLSTATE 55P02): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55P02 ERROR

parameter “…” cannot be changed now — 55P02

cant_change_runtime_param

PostgreSQL error "parameter "…" cannot be changed now" (SQLSTATE 55P02): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55P02 ERROR

Cant Change Runtime Param — SQLSTATE 55P02

cant_change_runtime_param

SQLSTATE 55P02 (cant_change_runtime_param): The object is not in a state that permits the operation.

Object Not In Prerequisite State
55P02 ERROR

parameter “…” cannot be changed without restarting the server — 55P02

cant_change_runtime_param

PostgreSQL error "parameter "…" cannot be changed without restarting the server" (SQLSTATE 55P02): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55P03 ERROR

could not obtain lock on relation “…” — 55P03

lock_not_available

PostgreSQL error "could not obtain lock on relation "…"" (SQLSTATE 55P03): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55P03 ERROR

could not obtain lock on row in relation “…” — 55P03

lock_not_available

PostgreSQL error "could not obtain lock on row in relation … — 55P03" (SQLSTATE 55P03): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55P03 ERROR

canceling statement due to lock timeout — 55P03

lock_not_available

PostgreSQL error "canceling statement due to lock timeout — 55P03" (SQLSTATE 55P03): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55P03 ERROR

Lock Not Available — SQLSTATE 55P03

lock_not_available

A requested lock could not be obtained (NOWAIT or lock_timeout).

Object Not In Prerequisite State
55P03 ERROR

canceling statement due to lock timeout — 55P03

lock_not_available

PostgreSQL error "canceling statement due to lock timeout" (SQLSTATE 55P03): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55P04 ERROR

unsafe use of new value of enum type — 55P04

unsafe_new_enum_value_usage

PostgreSQL error "unsafe use of new value of enum type — 55P04" (SQLSTATE 55P04): what it means, common causes, and how to fix it.

Object Not In Prerequisite State