<div dir="ltr"><div>Hi Ishii-San,</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 3, 2020 at 10:45 AM Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Usama,<br>
<br>
I am going to create the Japanese documentation part after you<br>
commit/push the English documentation patch.<br>
<br></blockquote><div>Thank you for the reminder. I have pushed the English documentation for the utility</div><div><br><a href="https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=9e979b7f0eb5b654b16519c30d6e767a65c37f7c" rel="noreferrer" target="_blank">https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=9e979b7f0eb5b654b16519c30d6e767a65c37f7c</a><br></div><div><br></div><div>Best regards</div><div>Muhammad Usama</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
<br>
> Hi Muhammad Usama:<br>
> <br>
> 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.<br>
> <br>
> <br>
> Thanks<br>
> Best regards<br>
> Zhou Jianshen<br>
> <br>
> <a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a><mailto:<a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a>><br>
> <br>
> ________________________________<br>
> 发件人: Muhammad Usama <<a href="mailto:m.usama@gmail.com" target="_blank">m.usama@gmail.com</a>><br>
> 发送时间: 2020年5月22日 0:48<br>
> 收件人: 周建身<br>
> 抄送: pgpool-hackers; Muhammad<br>
> 主题: Re: [pgpool-hackers: 3606] add the command of pcp_reload_config<br>
> <br>
> <br>
> On Tue, May 12, 2020 at 2:51 PM 周建身 <<a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a><mailto:<a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a>>> wrote:<br>
> <br>
> Hi Muhammad Usama:<br>
> <br>
> 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.<br>
> <br>
> And,in this patch,I used (--scope=cluster) to implement the cluster mode.<br>
> <br>
> <br>
> How to use the patch to test pcp_reload_config command<br>
> 1、do patch under the directory of pgpool<br>
> patch -p1 < pcp_reload_config.patch<br>
> 2、you should need automake and autoconf<br>
> <br>
> <br>
> for example:<br>
> $ autoheader<br>
> $ aclocal<br>
> $ automake -a -c<br>
> $ autoconf<br>
> <br>
> <br>
> 3、then to do make and make install<br>
> <br>
> 4、under the directory of bin,you can find the pcp_reload_config<br>
> <br>
> ./pcp_reload_config -s c or ./pcp_reload_config --scope=cluster<br>
> this can reload the config file of all pgpool nodes<br>
> <br>
> ./pcp_reload_config or ./pcp_reload_config -s l or ./pcp_reload_config --scope=local<br>
> this can only reload the config file of local pgpool node<br>
> <br>
> <br>
> Thanks<br>
> Best regards<br>
> Zhou Jianshen<br>
> <br>
> <a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a><mailto:<a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a>><br>
> <br>
> ________________________________<br>
> 发件人: Muhammad Usama <<a href="mailto:m.usama@gmail.com" target="_blank">m.usama@gmail.com</a><mailto:<a href="mailto:m.usama@gmail.com" target="_blank">m.usama@gmail.com</a>>><br>
> 发送时间: 2020年5月4日 21:43<br>
> 收件人: 周建身<br>
> 抄送: pgpool-hackers; Muhammad<br>
> 主题: Re: [pgpool-hackers: 3606] add the command of pcp_reload_config<br>
> <br>
> Hi Zhou Jianshen,<br>
> <br>
> Welcome to the Pgpool-II community and thanks for the patch.<br>
> <br>
> I just committed a reorganization patch and now this patch does not apply anymore<br>
> so can you please rebase it with the current head of the master branch.<br>
> <br>
> Secondly, you need to implement the cluster mode (--scope=cluster) for the<br>
> PCP reload config utility as well.<br>
> <br>
> For the reference, you can see the implementation same ( scope=cluster)<br>
> in the pcp_stop_pgpool utility.<br>
> <br>
> <a href="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=87e6e11c1931555e90a1cc65cc3ee79759ebaaab" rel="noreferrer" target="_blank">https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=87e6e11c1931555e90a1cc65cc3ee79759ebaaab</a><br>
> <br>
> You can find more info on steps for executing the command over watchdog network<br>
> in the following email.<br>
> <br>
> <a href="https://www.pgpool.net/pipermail/pgpool-hackers/2020-May/003608.html" rel="noreferrer" target="_blank">https://www.pgpool.net/pipermail/pgpool-hackers/2020-May/003608.html</a><br>
> <br>
> <br>
> Do let me know if you need further information or clarification<br>
> <br>
> Best Regards<br>
> <br>
> <br>
> On Wed, Apr 29, 2020 at 12:10 PM 周建身 <<a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a><mailto:<a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a>>> wrote:<br>
> <br>
> Hi Hackers,<br>
> <br>
> As Usama Muhammad said in his email before,we should enhance/add the PCP utilities more cluster-mode friendly.<br>
> <br>
> There are four commands which need to be added or enhanced.The first command which should be added is pcp_reload_config.<br>
> <br>
> <br>
> <br>
> 1- pcp_reload_config<br>
> ==================<br>
> The utility to make the whole Pgpool-II cluster to reload the<br>
> configuration files at once.<br>
> I think this is required because currently if some installation has<br>
> let say 3 node Pgpool-II cluster<br>
> and we want to change one specific configuration parameter ( for<br>
> example: adding a new backend node)<br>
> we would require to go on and edit Pgpool configuration files on each<br>
> node separately and then<br>
> issue pgpool reload on each node one by one.<br>
> <br>
> In my opinion, we need multiple enhancement in this area.<br>
> We need some mechanisms to let pgpool-II cluster use the centralized<br>
> configuration<br>
> ( except watchdog config) or at least a mechanism to push the<br>
> configuration settings using some<br>
> new utility like "pcp_load_config" that could take a pgpool.conf file<br>
> and propagate it to all nodes<br>
> using watchdog.<br>
> The centralized configuration part of the problem is a big task and I<br>
> believe we could take it on after the<br>
> "simplifying watchdog config" feature that Peng is working on.<br>
> Meanwhile, I think we can work on pcp_reload_config utility in<br>
> parallel to make reloading part easier.<br>
> <br>
> <br>
> <br>
> I tried to solve this command.And I realized reloading the configuration of an individual node.After Peng's working on<br>
> <br>
> watchdog config,we can eventually realize the reloading the configurations of all nodes.<br>
> <br>
> <br>
> How to use the patch,<br>
> <br>
> 1、do patch under the directory of pgpool-II-4.1.1<br>
> <br>
> patch -p1 < pcp_reload_config.patch<br>
> <br>
> 2、you should need automake and autoconf<br>
> <br>
> <br>
> for example:<br>
> $ autoheader<br>
> $ aclocal<br>
> $ automake -a -c<br>
> $ autoconf<br>
> <br>
> 3、then to do make and make install<br>
> <br>
> <br>
> 4、under the directory of bin,you can find the pcp_reload_config ,try is as ./pcp_reload_config<br>
> <br>
> <br>
> <br>
> <br>
> Comments and suggestions are welcome.<br>
> <br>
> <br>
> Thanks<br>
> Best regards<br>
> Zhou Jianshen<br>
> <br>
> <a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a><mailto:<a href="mailto:zhoujianshen@highgo.com" target="_blank">zhoujianshen@highgo.com</a>><br>
> <br>
> <br>
> _______________________________________________<br>
> pgpool-hackers mailing list<br>
> <a href="mailto:pgpool-hackers@pgpool.net" target="_blank">pgpool-hackers@pgpool.net</a><mailto:<a href="mailto:pgpool-hackers@pgpool.net" target="_blank">pgpool-hackers@pgpool.net</a>><br>
> <a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
> <br>
> <br>
> Hi Jianshen,<br>
> <br>
> Thank you for the patch. Overall the patch looks and had few minor issues.<br>
> <br>
> 1- In process_reload_config() function the log message was mentioning<br>
> pcp_stop_pgpool instead of pgpool_reload_config<br>
> <br>
> 2- When you want to throw an error to client from PCP processor you can just<br>
> use 'ereport' instead of creating the error message by hand.<br>
> <br>
> 3- No need to use different PCP packet type (Z and z ) for cluster and local modes.<br>
> instead, we can send the command scope in the packet load.<br>
> The reason we used the different packet types in the pcp_stop_pgpool was to keep<br>
> the backward compatibility. And since this is a new utility so we can send that<br>
> information in the packet data without worrying about compatibility.<br>
> <br>
> 4- '-n' argument is not required in the pcp_reload_config<br>
> 5- The patch contains some whitespace warnings.<br>
> <br>
> I have committed the patch after fixing the above-mentioned issues along with<br>
> few code re-arrangements in the pcp_frontend_client.c<br>
> <br>
> <a href="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=987b69945dc914b88099d1d0420c4b49f1097f2f" rel="noreferrer" target="_blank">https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=987b69945dc914b88099d1d0420c4b49f1097f2f</a><br>
> <br>
> <br>
> Also, the documentation part for the pcp_reload_utility was not included in the<br>
> patch. So can you please also submit the documentation updates for the utility,<br>
> I have marked this as a remaining item in the commit message.<br>
> <br>
> P.S updated patch that I committed is also attached<br>
> <br>
> Thanks<br>
> Best Regards<br>
> <br>
> <br>
> ...<br>
> Muhammad Usama<br>
> Highgo Software (Canada/China/Pakistan)<br>
> URL : <a href="http://www.highgo.ca" rel="noreferrer" target="_blank">http://www.highgo.ca</a><<a href="http://www.highgo.ca/" rel="noreferrer" target="_blank">http://www.highgo.ca/</a>><br>
> ADDR: 10318 WHALLEY BLVD, Surrey, BC<br>
> <br>
> <br>
> --<br>
> ...<br>
> Muhammad Usama<br>
> Highgo Software (Canada/China/Pakistan)<br>
> URL : <a href="http://www.highgo.ca" rel="noreferrer" target="_blank">http://www.highgo.ca</a><<a href="http://www.highgo.ca/" rel="noreferrer" target="_blank">http://www.highgo.ca/</a>><br>
> ADDR: 10318 WHALLEY BLVD, Surrey, BC<br>
</blockquote></div></div>