<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div><div>Thanks&nbsp;</div><div><br></div><div>Regarding the github, I think it would be ideal if you could switch to github as primary repo. I think it would be easier for the community to contribute, to log issues/questions, etc. It has become the standard for open-source projects. It would also be nice to have a way for us to contribute to documentation (correct typos,..etc.),.. but of course it might not be so easy to set that up...</div><div><br></div><div>Regards,&nbsp;</div><div><br></div><div class="ydpfd7e159dsignature">Pierre</div></div>
            <div><br></div><div><br></div>
            
            <div id="ydp372254a5yahoo_quoted_7648651754" class="ydp372254a5yahoo_quoted">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                    
                    <div>
                        On Tuesday, May 22, 2018, 12:43:52 AM GMT+2, Tatsuo Ishii &lt;ishii@sraoss.co.jp&gt; wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
                    <div><div dir="ltr">&gt; I did a test with the modified code and it is now working correctly. I have patched the 3.7.3 code (I patched it manually by editing the main.c on the line shown in your patch file)<br clear="none"><br clear="none">Thanks for the report. I will commit the patch soon (and it will<br clear="none">appear in the next minor releases).<br clear="none"><br clear="none">&gt; By the way, I found a git repository here&nbsp;<a shape="rect" href="https://github.com/pgpool/pgpool2 but " rel="nofollow" target="_blank">https://github.com/pgpool/pgpool2&nbsp;but </a>I was wondering if this git repo was the real one ? It does not seem to be maintained, is it ?<br clear="none"><br clear="none">It is just a copy of the original repository<br clear="none">(<a shape="rect" href="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=summary" rel="nofollow" target="_blank">https://git.postgresql.org/gitweb/?p=pgpool2.git;a=summary</a>) for<br clear="none">people who are familiar with Github, wanting to look into the source.<br clear="none">Currently it is maintained manually so sometimes it is outdated. We<br clear="none">plan to update automatically.<br clear="none"><br clear="none">Best regards,<br clear="none">--<br clear="none">Tatsuo Ishii<br clear="none">SRA OSS, Inc. Japan<br clear="none">English: <a shape="rect" href="http://www.sraoss.co.jp/index_en.php" rel="nofollow" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br clear="none">Japanese:<a shape="rect" href="http://www.sraoss.co.jp" rel="nofollow" target="_blank">http://www.sraoss.co.jp</a><div class="ydp372254a5yqt2221764529" id="ydp372254a5yqtfd81950"><br clear="none"><br clear="none">&gt; Thanks again for the good support.<br clear="none">&gt; Pierre <br clear="none">&gt; <br clear="none">&gt;&nbsp; &nbsp;  On Saturday, May 19, 2018, 9:33:07 AM GMT+2, Tatsuo Ishii &lt;<a shape="rect" href="mailto:ishii@sraoss.co.jp" rel="nofollow" target="_blank">ishii@sraoss.co.jp</a>&gt; wrote:&nbsp; <br clear="none">&gt;&nbsp; <br clear="none">&gt;&nbsp; Have a nice week-end too! I am looking forward to hearing from you<br clear="none">&gt; after coming back. Please don't hesitate to ask me regarding applying<br clear="none">&gt; the patch.<br clear="none">&gt; <br clear="none">&gt; Best regards,<br clear="none">&gt; --<br clear="none">&gt; Tatsuo Ishii<br clear="none">&gt; SRA OSS, Inc. Japan<br clear="none">&gt; English: <a shape="rect" href="http://www.sraoss.co.jp/index_en.php" rel="nofollow" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br clear="none">&gt; Japanese:<a shape="rect" href="http://www.sraoss.co.jp" rel="nofollow" target="_blank">http://www.sraoss.co.jp</a><br clear="none">&gt; <br clear="none">&gt;&gt; Hi Tatsuo<br clear="none">&gt;&gt; <br clear="none">&gt;&gt; Thanks for the prompt response and for the patch ! I am glad you could reproduce it.<br clear="none">&gt;&gt; <br clear="none">&gt;&gt; I am leaving now for a long week-end (monday is holiday in Belgium) and I am not familiar with patches to do it right now, but I'll definitively try when I am back. <br clear="none">&gt;&gt; <br clear="none">&gt;&gt; Have a good week-end<br clear="none">&gt;&gt; Pierre <br clear="none">&gt;&gt; <br clear="none">&gt;&gt;&nbsp; &nbsp; On Saturday, May 19, 2018, 3:50:28 AM GMT+2, Tatsuo Ishii &lt;<a shape="rect" href="mailto:ishii@sraoss.co.jp" rel="nofollow" target="_blank">ishii@sraoss.co.jp</a>&gt; wrote:&nbsp; <br clear="none">&gt;&gt;&nbsp; <br clear="none">&gt;&gt;&nbsp; Pierre,<br clear="none">&gt;&gt; <br clear="none">&gt;&gt;&gt; Hi,<br clear="none">&gt;&gt;&gt; I have a problem with pgpool 3.7.2 and pgpool 3.7.3, but not with pgpool 3.7.1 so it might be a bug.<br clear="none">&gt;&gt;&gt; When there is a failover from node 1 to node 0 then the parameter %P (old primary id) which is passed to the failover script is incorrect. It says 0 instead of 1. I encounter the error systematically when I do a first failover from node 0 to node 1, then a recovery of node 0, then a new failover from node 1 to node 0. In this new failover - from node 1 to node 0 - the parameter old_primary_id is not correctly passed.<br clear="none">&gt;&gt;&gt; I have reverted back to pgpool 3.7.1 and the problem has disappeared.<br clear="none">&gt;&gt;&gt; My config, for failover_command, is:<br clear="none">&gt;&gt;&gt; failover_command = '/scripts/failover.sh %d %h %p %D %m %H %M %P %r %R'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Executes this command at failover&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Special values:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp; &nbsp;%d = node id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp; &nbsp;%h = host name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp; &nbsp;%p = port number&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp; &nbsp;%D = database cluster path&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp; &nbsp;%m = new master node id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp; &nbsp;%H = hostname of the new master node&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp; &nbsp;%M = old master node id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp; &nbsp;%P = old primary node id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp; &nbsp;%r = new master port number<br clear="none">&gt;&gt;&gt; and in the log I see that the parameter %P is incorrect with pgpool 3.7.3 and pgpool 3.7.2 but that it is correct with pgpool 3.7.1<br clear="none">&gt;&gt;&gt; I can provide more logs and configuration if needed<br clear="none">&gt;&gt;&gt; Kind regards,&nbsp;<br clear="none">&gt;&gt;&gt; Pierre <br clear="none">&gt;&gt; <br clear="none">&gt;&gt; Thanks for the report. I was able to reproduce the problem. I think<br clear="none">&gt;&gt; problem with 3.7.2 and 3.7.3 is, they pass node id 0 if current<br clear="none">&gt;&gt; primary node's status is down. Of course the status is down because<br clear="none">&gt;&gt; it's the reason why the failover script gets called:-&lt; 3.7.1 does not<br clear="none">&gt;&gt; check the primary node status. So it correctly passes the failed<br clear="none">&gt;&gt; primary node id.<br clear="none">&gt;&gt; <br clear="none">&gt;&gt; I think the fix would be passes the primary node id regardless the<br clear="none">&gt;&gt; status. Attached one line patch does the trick. At least it worked for<br clear="none">&gt;&gt; me. So can you please try it out?<br clear="none">&gt;&gt; <br clear="none">&gt;&gt; Best regards,<br clear="none">&gt;&gt; --<br clear="none">&gt;&gt; Tatsuo Ishii<br clear="none">&gt;&gt; SRA OSS, Inc. Japan<br clear="none">&gt;&gt; English: <a shape="rect" href="http://www.sraoss.co.jp/index_en.php" rel="nofollow" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br clear="none">&gt;&gt; Japanese:<a shape="rect" href="http://www.sraoss.co.jp " rel="nofollow" target="_blank">http://www.sraoss.co.jp </a>&nbsp;  </div></div></div>
                </div>
            </div></div></body></html>