[pgpool-hackers: 1806] Feature for recording the watchdog warnings to be displayed by pcp_watchdog_info

Muhammad Usama m.usama at gmail.com
Fri Sep 16 05:23:50 JST 2016


Hi

I was working on fixing the "[pgpool-general: 4997] Avoiding downtime when
pgpool changes require a restart"
And the part of the fix was to downgrade the FATAL error to WARNING when
the configurations on the coordinator/master and the standby node differs.
But since some configuration differences on the watchdog nodes can be
catastrophic in some cases and the pgpool-II warning messages can be easily
ignored,
So I was thinking of a small watchdog feature that records all the warning
messages generated on a watchdog node and the pcp_watchdog_info on master
node displays all the warnings on the node.

See the attached WIP test patch.

Output of pcp_watchdog_info with the patch. The WARNING MESSAGE fields are
added by the attached patch

[usama at localhost bin]$ ./pcp_watchdog_info -h 127.0.0.1 -p 9891  -U
postgres  -w -v
Watchdog Cluster Information
Total Nodes          : 3
Remote Nodes         : 2
Quorum state         : QUORUM EXIST
Alive Remote Nodes   : 2
VIP up on local node : YES
Master Node Name     : Linux_localhost.localdomain_9991
Master Host Name     : localhost

Watchdog Node Information
Node Name      : Linux_localhost.localdomain_9991
Host Name      : localhost
Delegate IP    : Not_Set
Pgpool port    : 9991
Watchdog port  : 9001
Node priority  : 1
Status         : 4
Status Name    : MASTER
WARNING MESSAGES [0]

Node Name      : Linux_localhost.localdomain_9992
Host Name      : localhost
Delegate IP    : Not_Set
Pgpool port    : 9992
Watchdog port  : 9002
Node priority  : 1
Status         : 7
Status Name    : STANDBY
WARNING MESSAGES [1]
0 value for num_init_children is 1 which is 4 on the master node

Node Name      : Linux_localhost.localdomain_9993
Host Name      : localhost
Delegate IP    : Not_Set
Pgpool port    : 9993
Watchdog port  : 9003
Node priority  : 1
Status         : 7
Status Name    : STANDBY
WARNING MESSAGES [3]
0 value for num_init_children is 1 which is 4 on the master node
1 value for health_check_period is 10 which is 0 on the master node
2 value for enable_pool_hba is OFF which is ON on the master node


Thoughts and suggestions

Thanks
Best regards
Muhammad Usama
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20160916/de49fbe9/attachment-0001.html>


More information about the pgpool-hackers mailing list