[pgpool-hackers: 3618] 答复: add the command of pcp_reload_config

周建身 zhoujianshen at highgo.com
Tue May 12 18:51:09 JST 2020


​Hi Muhammad Usama:

​    Thanks for the suggestions you giving and the help you provided during my development. I have rebased my patch with the current head of the master branch.

And,in this patch,I used  (--scope=cluster)​ to implement the cluster mode.


How to use the patch to test pcp_reload_config command
1、do patch under the directory of pgpool
patch -p1 < pcp_reload_config.patch
2、you should need automake and autoconf


for example:
 $ autoheader
 $ aclocal
 $ automake -a -c
 $ autoconf


3、then to do make and make install

4、under the directory of bin,you can find the pcp_reload_config

./pcp_reload_config -s c or ./pcp_reload_config --scope=cluster
this can reload the config file of all pgpool nodes

./pcp_reload_config or ./pcp_reload_config -s l or ./pcp_reload_config --scope=local
this can only reload the config file of local pgpool node


Thanks
Best regards
Zhou Jianshen

zhoujianshen at highgo.com<mailto:zhoujianshen at highgo.com>​

________________________________
发件人: Muhammad Usama <m.usama at gmail.com>
发送时间: 2020年5月4日 21:43
收件人: 周建身
抄送: pgpool-hackers; Muhammad
主题: Re: [pgpool-hackers: 3606] add the command of pcp_reload_config

Hi Zhou Jianshen,

Welcome to the Pgpool-II community and thanks for the patch.

I just committed a reorganization patch and now this patch does not apply anymore
so can you please rebase it with the current head of the master branch.

Secondly, you need to implement the cluster mode (--scope=cluster) for the
PCP reload config utility as well.

For the reference, you can see the implementation same ( scope=cluster)
in the pcp_stop_pgpool utility.

https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=87e6e11c1931555e90a1cc65cc3ee79759ebaaab

You can find more info on steps for executing the command over watchdog network
in the following email.

https://www.pgpool.net/pipermail/pgpool-hackers/2020-May/003608.html


Do let me know if you need further information or clarification

Best Regards


On Wed, Apr 29, 2020 at 12:10 PM 周建身 <zhoujianshen at highgo.com<mailto:zhoujianshen at highgo.com>> wrote:

Hi Hackers,

    As Usama Muhammad said in his email before,we should enhance/add the PCP utilities more cluster-mode friendly.

There are four commands which need to be added or enhanced.The first command which should be added is pcp_reload_config.



    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.



I tried to solve this command.And I realized reloading the configuration of an individual node.After Peng's working on

watchdog config,we can eventually realize the reloading the configurations of all nodes.


How to use the patch,

1、do patch under the directory of pgpool-II-4.1.1

patch -p1 < pcp_reload_config.patch

2、you should need automake and autoconf


for example:
 $ autoheader
 $ aclocal
 $ automake -a -c
 $ autoconf

3、then to do make and make install


4、under the directory of bin,you can find the pcp_reload_config ,try is as  ./pcp_reload_config




Comments and suggestions are welcome.


Thanks
Best regards
Zhou Jianshen

zhoujianshen at highgo.com<mailto:zhoujianshen at highgo.com>


_______________________________________________
pgpool-hackers mailing list
pgpool-hackers at pgpool.net<mailto:pgpool-hackers at pgpool.net>
http://www.pgpool.net/mailman/listinfo/pgpool-hackers


--
...
Muhammad Usama
Highgo Software (Canada/China/Pakistan)
URL : http://www.highgo.ca<http://www.highgo.ca/>
ADDR: 10318 WHALLEY BLVD, Surrey, BC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20200512/ee70b05b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcp_reload_config.patch
Type: application/octet-stream
Size: 10807 bytes
Desc: pcp_reload_config.patch
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20200512/ee70b05b/attachment-0001.obj>


More information about the pgpool-hackers mailing list