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

Tatsuo Ishii ishii at sraoss.co.jp
Thu Jun 4 12:51:39 JST 2020


 Hi Usama,

Thanks for the commit. I have just commtted the Japanese doc.

> I am going to create the Japanese documentation part after you
> commit/push the English documentation patch.
> 
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
> 
>> Hi Muhammad Usama:
>> 
>>     the documentation part for the pcp_reload_utility is provided here. since,I don't understand japanese,Japanese documentation is not provided here.Maybe anyone can provide later.And I'd like to know is the patch of document right.
>> 
>> 
>> Thanks
>> Best regards
>> Zhou Jianshen
>> 
>> zhoujianshen at highgo.com<mailto:zhoujianshen at highgo.com>​
>> 
>> ________________________________
>> 发件人: Muhammad Usama <m.usama at gmail.com>
>> 发送时间: 2020年5月22日 0:48
>> 收件人: 周建身
>> 抄送: pgpool-hackers; Muhammad
>> 主题: Re: [pgpool-hackers: 3606] add the command of pcp_reload_config
>> 
>> 
>> On Tue, May 12, 2020 at 2:51 PM 周建身 <zhoujianshen at highgo.com<mailto:zhoujianshen at highgo.com>> wrote:
>> 
>> 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<mailto: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
>> 
>> 
>> Hi Jianshen,
>> 
>> Thank you for the patch. Overall the patch looks and had few minor issues.
>> 
>> 1- In process_reload_config() function the log message was mentioning
>> pcp_stop_pgpool instead of pgpool_reload_config
>> 
>> 2- When you want to throw an error to client from PCP processor you can just
>> use 'ereport' instead of creating the error message by hand.
>> 
>> 3- No need to use different PCP packet type (Z and z ) for cluster and local modes.
>> instead, we can send the command scope in the packet load.
>> The reason we used the different packet types in the pcp_stop_pgpool was to keep
>> the backward compatibility. And since this is a new utility so we can send that
>> information in the packet data without worrying about compatibility.
>> 
>> 4-  '-n' argument is not required in the pcp_reload_config
>> 5-  The patch contains some whitespace warnings.
>> 
>> I have committed the patch after fixing the above-mentioned issues along with
>> few code re-arrangements in the pcp_frontend_client.c
>> 
>> https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=987b69945dc914b88099d1d0420c4b49f1097f2f
>> 
>> 
>> Also, the documentation part for the pcp_reload_utility was not included in the
>> patch. So can you please also submit the documentation updates for the utility,
>> I have marked this as a remaining item in the commit message.
>> 
>> P.S updated patch that I committed is also attached
>> 
>> Thanks
>> Best Regards
>> 
>> 
>> ...
>> Muhammad Usama
>> Highgo Software (Canada/China/Pakistan)
>> URL : http://www.highgo.ca<http://www.highgo.ca/>
>> ADDR: 10318 WHALLEY BLVD, Surrey, BC
>> 
>> 
>> --
>> ...
>> Muhammad Usama
>> Highgo Software (Canada/China/Pakistan)
>> URL : http://www.highgo.ca<http://www.highgo.ca/>
>> ADDR: 10318 WHALLEY BLVD, Surrey, BC
> _______________________________________________
> pgpool-hackers mailing list
> pgpool-hackers at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-hackers


More information about the pgpool-hackers mailing list