↑↓ 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.

Reading PG 18current·documented in 9 of 27 versions, 12 to 20

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. 12 → 13 changed
  2. 11 → 12 added

Definition snapshot: b7bd9cda · English manual source