PG
PRO
57000ERRORTier 2 — Caution✅ HIGH confidence

operator intervention

Category: Operator InterventionVersions: All Postgres versions

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
SELECT pg_terminate_backend(:session_pid);
ERROR: terminating connection due to administrator command

Fix 1: Investigate why the session was terminated and reconnect

When receiving 57000 in application logs.

fix

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 docs: https://www.postgresql.org/docs/current/errcodes-appendix.html

🔧 Source ref: Class 57 — Operator Intervention

Confidence assessment

✅ HIGH confidence

Standard SQLSTATE. Stable across versions.

See also

📄 Reference pages

pg_terminate_backendpg_cancel_backendpg_stat_activity
⚙️ This error reference was generated with AI assistance and reviewed for accuracy. Examples are provided to illustrate common scenarios and may not cover every case. Always test fixes in a development environment before applying to production. Spotted an error? Suggest a correction →