08000 — connection_exception
08000
At a glance
SQLSTATE 08000 is connection_exception in Class 08. Connection exception is a broad connection-management condition. In the fixed PostgreSQL paths it is used by postgres_fdw when an abort-cleanup failure makes a foreign-server connection unusable; a refused client socket is not enough to claim this code.
| Field | Value |
|---|---|
| SQLSTATE | 08000 |
| Condition | connection_exception |
| Status | active |
| Known present by | 7.4 |
| Locked snapshots | 9.0.23, 9.1.24, 9.2.24, 9.3.25, 9.4.26, 9.5.25, 9.6.24, 10.23, 11.22, 12.22, 13.23, 14.24, 15.19, 16.15, 17.11, 18.6, 19beta3 |
| Macros | ERRCODE_CONNECTION_EXCEPTION |
| Aliases | — |
Meaning
Connection exception is a broad connection-management condition. In the fixed PostgreSQL paths it is used by postgres_fdw when an abort-cleanup failure makes a foreign-server connection unusable; a refused client socket is not enough to claim this code.
Diagnosis
Inspect the server log and the foreign server name, backend PID, transaction outcome, and FDW cleanup path. Compare the message with 08001 (a connection could not be established) and 08006 (an established connection failed). A client library can expose a different exception or no SQLSTATE.
Response
Repair the foreign connection or its cleanup condition, finish the failed transaction according to the exact path, and retry the complete safe unit only after the remote outcome is known. Do not relabel a generic network exception as 08000.
Messages
The fixed postgres_fdw branch emits ERROR with primary connection to server "%s" cannot be used due to abort cleanup failure; the foreign server name is dynamic. This source-backed variant is narrower than a generic client socket refusal.
Representative case
This page has no selected natural SQL run. The structured evidence records a source or definition boundary; a client-side RAISE would not represent a backend mechanism.
Versions
The generated facts table records the locked catalogue snapshots and earliest observed definition. This page has no selected natural SQL run; its fixed REL_18_6/REL_10_23 source boundary must not be read as an observed runtime result or as a claim about every intermediate release.
Related
08001— sqlclient_unable_to_establish_sqlconnection08006— connection_failure08007— transaction_resolution_unknown
Sources
src.fdw-connection.18.6—contrib/postgres_fdw/connection.catREL_18_6commit724edf9bde9d356724ad384a2e196edc3c9f80f7; fixed blob SHA-25667fc002657f2c7df6d93cbf99c933cbc103907d1857ed77aedbb85099ea4dda0(source).src.fdw-connection.10.23—contrib/postgres_fdw/connection.catREL_10_23commit02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4; fixed blob SHA-2568a8b053e4ef599d95d0709744aa1dd5bb20047af9dc29b3f42cfba5785e525c5(source).src.calls.REL_18_6/src.calls.REL_10_23— fixed local call scans, SHA-2569ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf/00d16d3eb01b71ccf1b245c8f3102f9d0ec9f36fb02777b8dd1b99fcb263040c; these scans preserve the resolved call context used by the claims.