[pgpool-hackers: 3582] PCP command to interact with Pgpool-II cluster

Muhammad Usama m.usama at gmail.com
Mon Apr 20 18:58:22 JST 2020


Hi Hackers,

When PCP was first added to Pgpool-II it was meant to manage/control
the single Pgpool-II instance.
And after the addition of watchdog more often than not multiple
Pgpool-II nodes are installed the system
and there is not much work/thoughts have gone into the enhancements of
the PCP utilities to make
them work on the Pgpool-II cluster.  So lately I was thinking to
enhance/add the PCP utilities to make them
more cluster-mode friendly.
And for that purpose, I think we would require to add/enhance the
following PCP commands.

1- pcp_reload_config
==================
The utility to make the whole Pgpool-II cluster to reload the
configuration files at once.
I think this is required because currently if some installation has
let say 3 node Pgpool-II cluster
and we want to change one specific configuration parameter ( for
example: adding a new backend node)
we would require to go on and edit Pgpool configuration files on each
node separately and then
issue pgpool reload on each node one by one.

In my opinion, we need multiple enhancement in this area.
We need some mechanisms to let pgpool-II cluster use the centralized
configuration
( except watchdog config) or at least a mechanism to push the
configuration settings using some
new utility like "pcp_load_config" that could take a pgpool.conf file
and propagate it to all nodes
using watchdog.
The centralized configuration part of the problem is a big task and I
believe we could take it on after the
"simplifying watchdog config" feature that Peng is working on.
Meanwhile, I think we can work on pcp_reload_config utility in
parallel to make reloading part easier.

2- pcp_restart_pgpool [cluster]
==========================
Sometimes, a simple restart solves more problems than any other remedy
or debugging.
So I think we should have a PCP utility to restart a Pgpool-II node or
all node on Pgpool-II cluster.
something similar in functionality like "pg_ctl restart" in postgres

3- pcp_watchdog_re-elect
======================
What if we want to change the master/coordinator node of the watchdog cluster.
There exists no good way for that currently. So I purpose we should
have a command to make
watchdog re-do the elections. I already had a discussion on this one
with Ishii-San sometimes
back so I will send a separate proposal for that as well


4- pcp_stop_pgpool enhancements
===================
pcp_stop_pgpool should be able to stop all the Pgpool-II nodes in
Pgpool-II cluster.
And for that, I have also cooked up a POC patch which allows the
[--all (-a)] option to
pcp_stop_pgpool utility and when this --all is specified then the
utility stops all the Pgpool-II
nodes part of the watchdog cluster.
So can you please try the patch and also suggest about the command
line option we should
use for making the PCP commands interact with cluster rather than the
single node.
Because I think --all would not be the best choice since it is used by
other utilities for a different purpose,
and we should come up with new standard command-line switch for all
utilities if they want to operate on
the cluster rather than on a single node.
Or another way would be to leave the pcp_stop_pgpool utility untouched
and add a new utility pcp_stop_cluster ?

So what are your suggestions and thoughts on this and do you have
other functions especially related to
cluster mode of pgpool-II that needed controlling/management using PCP system?


Thanks
Best regards
Muhammad Usama
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcp_terminate_cluster.diff
Type: application/octet-stream
Size: 16590 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20200420/9b839dc6/attachment-0001.obj>


More information about the pgpool-hackers mailing list