57000
PostgreSQLERRORNotableOperator InterventionHIGH confidence

operator intervention

What this means

SQLSTATE 57000 is the generic operator intervention code raised when a Postgres operator (DBA) terminates or pauses a session or query through administrative commands. See also 57014 (query_canceled) and 57P01 (admin_shutdown).

Why it happens
  1. 1A DBA called pg_terminate_backend or pg_cancel_backend on the session
  2. 2The Postgres server was sent a SIGTERM or other termination signal
How to reproduce

DBA terminating a session.

trigger — this will error
trigger — this will error
SELECT pg_terminate_backend(:session_pid);

expected output

ERROR:  terminating connection due to administrator command

Fix

Investigate why the session was terminated and reconnect

WHEN When receiving 57000 in application logs.

Why this works

Review DBA runbooks and server logs to understand why the session was terminated. Reconnect and resume the operation if appropriate.

Sources
Official documentation ↗

Class 57 — Operator Intervention

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All PostgreSQL errors