PCP_PROMOTE_NODE(1) | pgpool-II 4.3.5 Documentation | PCP_PROMOTE_NODE(1) |
pcp_promote_node - promotes the given node as new main to Pgpool-II
pcp_promote_node [options...] [node_id] [gracefully] [switchover]
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 unless switchover option is specified: it just changes the internal status of Pgpool-II and trigger failover and users have to promote standby PostgreSQL outside Pgpool-II.
If switchover is specified, Pgpool-II detaches current primary (changes the internal status to down) and execute the failover_command, with the new main node argument to be set to the specified node id. Because most failover scripts promote the new main node, the specified node will be the new primary node. The follow_primary_command is necessary to be set properly to turn the former primary into standby.
pcp_promote_node executes followings if switchover is not specified. 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.
pcp_promote_node executes followings if switchover is specified. If follow_primary_command is set, the command will be executed. You need to set follow_primary_command before executing this command because failover script will create the new primary and other nodes need to be turned into standbys
-n node_id
--node-id=node_id
-g
--gracefully
-s
--switchover
Other options
2023 | pgpool-II 4.3.5 |