↑↓ select ↵ open ⌫ change scope Open full search

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

Functions / System Administration Functions

pg_terminate_backend

Read the PG 18 manual

Terminates the session whose backend process has the specified process ID.

Reading PG 18current·documented in 19 of 27 versions, 8.4 to 20

Signatures & examples

pg_terminate_backend ( pid integer, timeout bigint DEFAULT 0 ) → boolean
Terminates the session whose backend process has the specified process ID. This is also allowed if the calling role is a member of the role whose backend is being terminated or the calling role has privileges of pg_signal_backend, however only superusers can terminate superuser backends. As an exception, roles with privileges of pg_signal_autovacuum_worker are permitted to terminate autovacuum worker processes, which are otherwise considered superuser backends.
Version history 8
  1. 17 → 18 changed
  2. 14 → 15 changed
  3. 13 → 14 changed
  4. 12 → 13 changed
  5. 9.5 → 9.6 changed
  6. 9.4 → 9.5 changed
  7. 9.1 → 9.2 changed
  8. 8.3 → 8.4 added

Definition snapshot: b7bd9cda · English manual source