pcp_node_info returns record
(integer node_id, text host, integer port, text username, text password, out status text, out weight float4, out role text, out replication_delay bigint, out last_status_change timestamp);
pcp_node_info returns record
(integer node_id, text pcp_server, out status text, out weight float4, out role text, out replication_delay bigint, out last_status_change timestamp);
The index of backend node to get information of.
The foreign server name for pcp server.
See pcp_common_options.
Here is an example output:
test=# SELECT * FROM pcp_node_info(0,'',11001,'t-ishii','t-ishii'); host | port | status | weight | role | replication_delay | last_status_change ------+-------+-------------------+--------+---------+-------------------+--------------------- /tmp | 11002 | Connection in use | 0 | Primary | 0 | 2018-07-04 17:34:39 (1 row)
Note: role, replication_delay, last_status_change out parameters are new from Pgpool-II 4.0. If you have already installed pre-4.0 pgpool_adm extension, you can upgrade to the new one by using ALTER EXTENSION SQL command.
ALTER EXTENSION pgpool_adm UPDATE;