pcp_node_info
Options
-
-n
node_id
--node-id= node_id -
The index of backend node to get information of.
- Other options
-
See pcp_common_options .
Example
Here is an example output:
$ pcp_node_info -h localhost -U postgres 0 host1 5432 1 0.500000 waiting primary
The result is in the following order:
1. hostname 2. port number 3. status 4. load balance weight 5. status name 6. backend role
Status is represented by a digit from [0 to 3].
-
0 - This state is only used during the initialization. PCP will never display it.
-
1 - Node is up. No connections yet.
-
2 - Node is up. Connections are pooled.
-
3 - Node is down.
The load balance weight is displayed in normalized format.
The --verbose option can help understand the output. For example:
$ pcp_node_info --verbose -h localhost -U postgres 0 Hostname : host1 Port : 5432 Status : 1 Weight : 0.500000 Status Name: waiting Role : primary