[pgpool-hackers: 3925] Allow pcp_node_ino to list all backend nodes information
Bo Peng
pengbo at sraoss.co.jp
Sat Jun 12 21:36:34 JST 2021
I created a patch to allow pcp_node_info command to
list all backend nodes information.
Currently pcp_node_info command can only display the node information
which is specified using "-n" or "--node-id" option.
$ pcp_node_info -w -p 11001 -n 0
/tmp 11002 1 0.500000 waiting up primary primary 0 none none 2021-06-12 01:00:21
$ pcp_node_info -w -p 11001 -n 1
/tmp 11003 1 0.500000 waiting up standby standby 0 streaming async 2021-06-12 01:00:21
This patch allows pcp_node_info command to list all backend nodes information
using "-a" or "--all" option.
$ pcp_node_info -w -p 11001 -a
/tmp 11002 1 0.500000 waiting up primary primary 0 none none 2021-06-12 01:00:21
/tmp 11003 1 0.500000 waiting up standby standby 0 streaming async 2021-06-12 01:00:21
$ pcp_node_info -w -p 11001 -a -v
Hostname : /tmp
Port : 11002
Status : 1
Weight : 0.500000
Status Name : waiting
Backend Status Name : up
Role : primary
Backend Role : primary
Replication Delay : 0
Replication State : none
Replication Sync State : none
Last Status Change : 2021-06-12 01:00:21
Hostname : /tmp
Port : 11003
Status : 1
Weight : 0.500000
Status Name : waiting
Backend Status Name : up
Role : standby
Backend Role : standby
Replication Delay : 0
Replication State : streaming
Replication Sync State : async
Last Status Change : 2021-06-12 01:00:21
--
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan
http://www.sraoss.co.jp/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcp_node_info_v1.patch
Type: application/octet-stream
Size: 27866 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20210612/e2a8f4d8/attachment-0001.obj>
More information about the pgpool-hackers
mailing list