II. PCP commands

This part contains reference information for PCP commands. PCP commands are UNIX commands which manipulate pgpool-II via the network. Please note that the parameter format for all PCP commands has been changed since Pgpool-II 3.5.

1. PCP connection authentication

PCP user names and passwords must be declared in pcp.conf in $prefix/etc directory (see Section 4.2 to know to create the file). -F option can be used when starting Pgpool-II if pcp.conf is placed somewhere else.

2. PCP password file

The file .pcppass in a user's home directory or the file referenced by environment variable PCPPASSFILE can contain passwords to be used if no password has been specified for the pcp connection.

This file should contain lines of the following format:

      hostname:port:username:password
     

(You can add a reminder comment to the file by copying the line above and preceding it with #.) Each of the first three fields can be a literal value, or *, which matches anything. The password field from the first line that matches the current connection parameters will be used. (Therefore, put more-specific entries first when you are using wildcards.) If an entry needs to contain : or \, escape this character with \. The hostname field is matched to the host connection parameter if that is specified, if the host parameter is not given then the host name localhost is searched for. The host name localhost is also searched for when the connection is a Unix domain socket connection and the host parameter matches the default pcp socket directory path.

The permissions on .pcppass must disallow any access to world or group; achieve this by the command chmod 0600 ~/.pcppass. If the permissions are less strict than this, the file will be ignored.

Table of Contents
pcp_common_options --  common options used in PCP commands
pcp_node_count --  displays the total number of database nodes
pcp_node_info --  displays the information on the given node ID
pcp_watchdog_info --  displays the watchdog status of the Pgpool-II
pcp_proc_count --  displays the list of Pgpool-II children process IDs
pcp_proc_info --  displays the information on the given Pgpool-II child process ID
pcp_pool_status --  displays the parameter values as defined in pgpool.conf
pcp_detach_node --  detaches the given node from Pgpool-II. Exisiting connections to Pgpool-II are forced to be disconnected.
pcp_attach_node --  attaches the given node to Pgpool-II.
pcp_promote_node --  promotes the given node as new master to Pgpool-II
pcp_stop_pgpool --  terminates the Pgpool-II process
pcp_recovery_node --  attaches the given backend node with recovery