PostgreSQL Error Reference

Every error, explained

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

3827 errors documentedFree diagnostics on every pageAll PG versions covered

Showing 3600 of 3827 errors

55000 ERROR

REPACK can only be used if “…” > 0 — 55000

object_not_in_prerequisite_state

PostgreSQL error "REPACK can only be used if "…" > 0" (SQLSTATE 55000, object_not_in_prerequisite_state): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55000 ERROR

cannot use PID n for inactive replication origin with ID n — 55000

object_not_in_prerequisite_state

PostgreSQL error "cannot use PID n for inactive replication origin with ID n" (SQLSTATE 55000, object_not_in_prerequisite_state): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55000 ERROR

logical replication sequence synchronization failed for subscriptio… — 55000

object_not_in_prerequisite_state

PostgreSQL error "logical replication sequence synchronization failed for subscription "…"" (SQLSTATE 55000, object_not_in_prerequisite_state): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55000 ERROR

could not detect conflict as the leader apply worker has exited — 55000

object_not_in_prerequisite_state

PostgreSQL error "could not detect conflict as the leader apply worker has exited" (SQLSTATE 55000, object_not_in_prerequisite_state): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55000 ERROR

cannot generate DDL for invalid database “…” — 55000

object_not_in_prerequisite_state

PostgreSQL error "cannot generate DDL for invalid database "…"" (SQLSTATE 55000, object_not_in_prerequisite_state): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55000 ERROR

manifest requires WAL from non-final timeline n ending at n/n, but… — 55000

object_not_in_prerequisite_state

PostgreSQL error "manifest requires WAL from non-final timeline n ending at n/n, but this server switched timelines at n/n" (SQLSTATE 55000, object_not_in_prerequisite_state): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55000 ERROR

WAL summaries are required on timeline n from n/n to n/n, but no su… — 55000

object_not_in_prerequisite_state

PostgreSQL error "WAL summaries are required on timeline n from n/n to n/n, but no summaries for that timeline and LSN range exist" (SQLSTATE 55000, object_not_in_prerequisite_state): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55000 ERROR

logical replication target relation “…” has neither REPLICA IDENTIT… — 55000

object_not_in_prerequisite_state

PostgreSQL error "logical replication target relation "…" has neither REPLICA IDENTITY index nor PRIMARY KEY and published relation does not have REPLICA IDENTITY FULL" (SQLSTATE 55000, object_not_in_prerequisite_state): 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

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
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

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 used by an active logical replication slot — 55006

object_in_use

PostgreSQL error "database "…" is used by an active logical replication slot" (SQLSTATE 55006, object_in_use): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55006 ERROR

database “…” is being used by logical replication subscription — 55006

object_in_use

PostgreSQL error "database "…" is being used by logical replication subscription" (SQLSTATE 55006, object_in_use): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55006 ERROR

database “…” is being used by prepared transactions — 55006

object_in_use

PostgreSQL error "database "…" is being used by prepared transactions" (SQLSTATE 55006, object_in_use): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55006 ERROR

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

object_in_use

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

Object Not In Prerequisite State
55006 ERROR

cannot change the tablespace of the currently open database — 55006

object_in_use

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

Object Not In Prerequisite State
55006 ERROR

cannot … “…” because it is being used by active queries in this ses… — 55006

object_in_use

PostgreSQL error "cannot … "…" because it is being used by active queries in this session" (SQLSTATE 55006, object_in_use): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55006 ERROR

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

object_in_use

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

Object Not In Prerequisite State
55006 ERROR

aborting because lock on relation “…” is not available — 55006

object_in_use

PostgreSQL error "aborting because lock on relation "…" is not available" (SQLSTATE 55006, object_in_use): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55006 ERROR

directory “…” already in use as a tablespace — 55006

object_in_use

PostgreSQL error "directory "…" already in use as a tablespace" (SQLSTATE 55006, object_in_use): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55006 ERROR

current user cannot be dropped — 55006

object_in_use

PostgreSQL error "current user cannot be dropped" (SQLSTATE 55006, object_in_use): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55006 ERROR

session user cannot be dropped — 55006

object_in_use

PostgreSQL error "session user cannot be dropped" (SQLSTATE 55006, object_in_use): what it means, common causes, and how to fix it.

Object Not In Prerequisite State
55006 ERROR

could not drop replication origin with ID n, in use by PID n — 55006

object_in_use

PostgreSQL error "could not drop replication origin with ID n, in use by PID n" (SQLSTATE 55006, object_in_use): what it means, common causes, and how to fix it.

Object Not In Prerequisite State