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