select open change scope Open full search

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

FUNCTIONS / SYSTEM ADMINISTRATION FUNCTIONS

Promotes a standby server to primary status.

Signatures & examples

pg_promote ( wait boolean DEFAULT true, wait_seconds integer DEFAULT 60 ) → boolean
Promotes a standby server to primary status. With wait set to true (the default), the function waits until promotion is completed or wait_seconds seconds have passed, and returns true if promotion is successful and false otherwise. If wait is set to false, the function returns true immediately after sending a SIGUSR1 signal to the postmaster to trigger promotion.
Version history 2
  1. PG 12 → 13changed
  2. PG 11 → 12added

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source