select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

SQLSTATE / CLASS 08 · CONNECTION EXCEPTION

connection_exception

SQLSTATE
08000
Condition name
connection_exception
Class
Connection Exception
Source macro
ERRCODE_CONNECTION_EXCEPTION
Evidence
Source path confirmed
Analysis & operational context

English SQLSTATE atlas: authored explanations and source/runtime evidence are separate from the manual definitions. View source ↗

<h1>08000</h1>

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.

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.

Sources

  • src.fdw-connection.18.6contrib/postgres_fdw/connection.c at REL_18_6 commit 724edf9bde9d356724ad384a2e196edc3c9f80f7; fixed blob SHA-256 67fc002657f2c7df6d93cbf99c933cbc103907d1857ed77aedbb85099ea4dda0 (source).
  • src.fdw-connection.10.23contrib/postgres_fdw/connection.c at REL_10_23 commit 02991e79f8f58bc208f05dcc8af0c62dbe0a6ea4; fixed blob SHA-256 8a8b053e4ef599d95d0709744aa1dd5bb20047af9dc29b3f42cfba5785e525c5 (source).
  • src.calls.REL_18_6 / src.calls.REL_10_23 — fixed local call scans, SHA-256 9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf / 00d16d3eb01b71ccf1b245c8f3102f9d0ec9f36fb02777b8dd1b99fcb263040c; these scans preserve the resolved call context used by the claims.

Source evidence

Evidence belongs to the frozen source and runtime versions listed here. It is not a runtime verification of the selected manual version.

08000 is the connection_exception condition in Class 08.

Method: Read the fixed errcodes.txt definition and the locked catalogue metadata.

Limits: Directory identity does not identify every backend or client path.

src.errcodes.18.6

The source scan resolves this class code to `postgres_fdw` abort-cleanup handling when a foreign connection cannot be discarded cleanly. It is source-path evidence, not a general socket failure case.

Method: Trace the fixed REL_18_6 and REL_10_23 source call scans and the recorded source paths.

Limits: This is a bounded source claim; it is not an observed natural SQLSTATE case.

src.fdw-connection.18.6 src.fdw-connection.10.23

The locked catalogue records 08000 in the listed snapshots; this source-only page compares the fixed REL_18_6 and REL_10_23 postgres_fdw source/call records and has no selected natural runtime.

Method: Read the generated facts block and fixed postgres_fdw source/call records; no runtime target summaries are used for this page.

Limits: Presence in a definition file is not an exact behavioral introduction, and the fixed source records do not prove every intermediate release or ordinary client connection failure.

src.errcodes.18.6 src.calls.REL_18_6 src.calls.REL_10_23

Message templates

explicit ERROR · message.fdw-abort-cleanup

Primary

connection to server "%s" cannot be used due to abort cleanup failure

The foreign server name is dynamic; this fixed postgres_fdw branch is not a generic client socket refusal.

Reproduction & repair cases

source_boundary · PG 10, 18

Preconditions

  • A runner-owned disposable target is provisioned only if a source-boundary smoke run is requested.

Trigger: No artificial SQL trigger is executed; this record preserves the fixed source/definition boundary.

Expected assertions

    Repair: Use the concrete source path or component-specific documentation when it applies.

    Cleanup: Drop the case schema with an owner connection.

    Recorded runtime evidence

    No runtime observation is attached to this entry.

    Definition snapshot: english-manuals:b58038c1138d0e8bc473e5b6013… · English manual source