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

Muhammad Usama m.usama at gmail.com
Thu Apr 23 18:06:35 JST 2020


On Tue, Apr 21, 2020 at 12:33 PM Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
>
> Usama,
>
> Thank you for the propsal.
>
> > 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.
>
> Yeah, we definitely need it.
>
> > 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.
>
> +1.
>
> > 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
>
> +1.
>
> > 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
>
> Looking forward to seeing it.
>
> > 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.
>
> +1.
>
> What about:
>
> --cluster, -c   /* affect to whole watchdog cluster */
> --local, -l     /* affect only to local watchdog cluster */

Yes seems like a good option since both -c and -l are currently not
used by any PCP utility.


>
> We actually need --cluster only but for completeness I feel like we'd
> want to have --local as well (it exactly behaves as PCP commands do
> today).
>
> > 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?
>
> I have tested your patch and it worked as expected. Great!

Thanks, I will make the argument changes (-c and -l) and push it.

Best regards
Muhammad Usama

>
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list