PostgreSQL Error Reference

Every error, explained

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

3910 errors documentedFree diagnostics on every pageAll PG versions covered

Showing 72 of 3910 errors

08006 ERROR

synchronization worker “…” could not connect to the primary server: … — 08006

connection_failure

PostgreSQL error "synchronization worker "…" could not connect to the primary server: …" (SQLSTATE 08006, connection_failure): what it means, common causes, and how to fix it.

Connection Exception
08006 ERROR

streaming replication receiver “…” could not connect to the primary… — 08006

connection_failure

PostgreSQL error "streaming replication receiver "…" could not connect to the primary server: …" (SQLSTATE 08006, connection_failure): what it means, common causes, and how to fix it.

Connection Exception
08006 ERROR

table synchronization worker for subscription “…” could not connect… — 08006

connection_failure

PostgreSQL error "table synchronization worker for subscription "…" could not connect to the publisher: …" (SQLSTATE 08006, connection_failure): what it means, common causes, and how to fix it.

Connection Exception
08006 ERROR

apply worker for subscription “…” could not connect to the publishe… — 08006

connection_failure

PostgreSQL error "apply worker for subscription "…" could not connect to the publisher: …" (SQLSTATE 08006, connection_failure): what it means, common causes, and how to fix it.

Connection Exception
08006 ERROR

could not receive list of replicated sequences from the publisher: … — 08006

connection_failure

PostgreSQL error "could not receive list of replicated sequences from the publisher: …" (SQLSTATE 08006, connection_failure): what it means, common causes, and how to fix it.

Connection Exception
08006 ERROR

could not obtain recovery progress from the publisher: … — 08006

connection_failure

PostgreSQL error "could not obtain recovery progress from the publisher: …" (SQLSTATE 08006, connection_failure): what it means, common causes, and how to fix it.

Connection Exception
08006 ERROR

could not fetch sequence information from the publisher: … — 08006

connection_failure

PostgreSQL error "could not fetch sequence information from the publisher: …" (SQLSTATE 08006, connection_failure): what it means, common causes, and how to fix it.

Connection Exception
08006 ERROR

sequencesync worker for subscription “…” could not connect to the p… — 08006

connection_failure

PostgreSQL error "sequencesync worker for subscription "…" could not connect to the publisher: …" (SQLSTATE 08006, connection_failure): what it means, common causes, and how to fix it.

Connection Exception
08006 ERROR

SQLSTATE 08006 — connection_failure: Mid-Session Connection Drop

connection_failure

SQLSTATE 08006 connection_failure: diagnose mid-session connection drops caused by pgBouncer idle timeout, NAT gateway RST, tcp_keepalives misconfiguration, and idle_in_transaction_session_timeout.

08 — Connection Exception
08006 FATAL

could not connect to the primary server: connection refused — 08006

connection_failure

PostgreSQL error "could not connect to the primary server: connection refused — 08006" (SQLSTATE 08006): what it means, common causes, and how to fix it.

Connection Exception
08006 FATAL

connection to server was lost — 08006

connection_failure

PostgreSQL error "connection to server was lost — 08006" (SQLSTATE 08006): what it means, common causes, and how to fix it.

Connection Exception
08006 FATAL

SSL SYSCALL error: EOF detected — 08006

connection_failure

PostgreSQL error "SSL SYSCALL error: EOF detected — 08006" (SQLSTATE 08006): what it means, common causes, and how to fix it.

Connection Exception
08007 ERROR

Transaction Resolution Unknown — SQLSTATE 08007

transaction_resolution_unknown

SQLSTATE 08007 (transaction_resolution_unknown): The client/server connection could not be established or was lost.

Connection Exception
08P01 ERROR

invalid SCRAM response — 08P01

protocol_violation

PostgreSQL error "invalid SCRAM response" (SQLSTATE 08P01, protocol_violation): what it means, common causes, and how to fix it.

Connection Exception
08P01 FATAL

received unencrypted data after GSSAPI encryption request — 08P01

protocol_violation

PostgreSQL error "received unencrypted data after GSSAPI encryption request" (SQLSTATE 08P01, protocol_violation): what it means, common causes, and how to fix it.

Connection Exception
08P01 ERROR

Protocol Violation — SQLSTATE 08P01

protocol_violation

The client/server wire protocol was violated.

Connection Exception
08P01 ERROR

invalid response from primary server — 08P01

protocol_violation

PostgreSQL error "invalid response from primary server" (SQLSTATE 08P01, protocol_violation): what it means, common causes, and how to fix it.

Connection Exception
08P01 FATAL

received unencrypted data after SSL request — 08P01

protocol_violation

PostgreSQL error "received unencrypted data after SSL request" (SQLSTATE 08P01, protocol_violation): what it means, common causes, and how to fix it.

Connection Exception
08P01 ERROR

received invalid response to SSL negotiation — 08P01

protocol_violation

PostgreSQL error "received invalid response to SSL negotiation" (SQLSTATE 08P01): what it means, common causes, and how to fix it.

Connection Exception
08P01 ERROR

malformed SCRAM message — 08P01

protocol_violation

PostgreSQL error "malformed SCRAM message" (SQLSTATE 08P01, protocol_violation): what it means, common causes, and how to fix it.

Connection Exception
08P01 ERROR

invalid query response — 08P01

protocol_violation

PostgreSQL error "invalid query response" (SQLSTATE 08P01, protocol_violation): what it means, common causes, and how to fix it.

Connection Exception
08P01 ERROR

unexpected message type 0xn during COPY from stdin — 08P01

protocol_violation

PostgreSQL error "unexpected message type 0xn during COPY from stdin" (SQLSTATE 08P01, protocol_violation): what it means, common causes, and how to fix it.

Connection Exception
08P01 ERROR

expected SASL response, got message type n — 08P01

protocol_violation

PostgreSQL error "expected SASL response, got message type n" (SQLSTATE 08P01, protocol_violation): what it means, common causes, and how to fix it.

Connection Exception
08P01 ERROR

client selected an invalid SASL authentication mechanism — 08P01

protocol_violation

PostgreSQL error "client selected an invalid SASL authentication mechanism" (SQLSTATE 08P01, protocol_violation): what it means, common causes, and how to fix it.

Connection Exception