pcp_promote_node

Name

pcp_promote_node --  promotes the given node as new main to Pgpool-II

Synopsis

pcp_promote_node [options...] [node_id] [gracefully]

Description

pcp_promote_node promotes the given node as new primary to Pgpool-II. In streaming replication mode only. Please note that this command does not actually promote standby PostgreSQL backend: it just changes the internal status of Pgpool-II and trigger failover and users have to promote standby PostgreSQL outside Pgpool-II.

pcp_promote_node executes followings. Please be warned that if follow_primary_command is set, the command will be executed. It is a standard advice that you disable follow_primary_command before executing this command.

  1. Change the status of standby PostgreSQL from standby to primary. It just changes the internal status of Pgpool-II and it does not actually promote PostgreSQL standby server.

  2. Change the status of PostgreSQL node which is not specified by this command's argument to down. It just changes the internal status of Pgpool-II and it does not actually make PostgreSQL standby server down.

  3. If follow_primary_command is set, execute follow_primary_command against PostgreSQL.

Options

-n node_id
--node-id=node_id

The index of backend node to promote as new main.

-g
--gracefully

Wait until all clients are disconnected (unless client_idle_limit_in_recovery is -1 or recovery_timeout is expired).

Other options

See pcp_common_options.