<div dir="ltr">Hi Ishii San<br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 8, 2017 at 4:36 AM, Tatsuo Ishii <span dir="ltr"><<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Usama,<br>
<br>
You did not back patch following commit to 3.4:<br></blockquote><div><br></div><div>Watchdog was revamped in Pgpool-II 3.5 which modernised the watchdog communication protocol along with other things, And the older watchdogs lacked the necessary infrastructure to support this feature.</div><div>So I only added this enhancement to Pgpool-II 3.5 and above</div><div><br></div><div>Thanks</div><div>Best Regards</div><div>Muhammad Usama</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
commit bda946e718fe6f3605eb7e82ada875<wbr>4bd84a279c<br>
Author: Muhammad Usama <<a href="mailto:m.usama@gmail.com">m.usama@gmail.com</a>><br>
Date: Tue Aug 2 17:31:22 2016 +0500<br>
<br>
Fix for 218: Inconsistent status of Postgresql nodes in pgPool instances<br>
after restart. Watchdog not syncing status.<br>
<br>
In this commit you added:<br>
<br>
/* initialize Req_info */<br>
Req_info->master_node_id = get_next_master_node();<br>
Req_info->conn_counter = 0;<br>
Req_info->switching = false;<br>
Req_info->request_queue_head = Req_info->request_queue_tail = -1;<br>
Req_info->primary_node_id = -2; <--- added<br>
<br>
So this was not added to 3.4.<br>
<br>
After that I committed following back to 3.4.<br>
<a href="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=e4ce880bd36b8f249bf693c086a1313148f3449a" rel="noreferrer" target="_blank">https://git.postgresql.org/<wbr>gitweb/?p=pgpool2.git;a=<wbr>commit;h=<wbr>e4ce880bd36b8f249bf693c086a131<wbr>3148f3449a</a><br>
<br>
commit e4ce880bd36b8f249bf693c086a131<wbr>3148f3449a<br>
Author: Tatsuo Ishii <<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>><br>
Date: Wed May 10 08:30:17 2017 +0900<br>
<br>
Fix corner case bug in Pgpool-II starting up.<br>
<br>
It is possible that a failover request is accepted before primary node<br>
is searched. This leads Pgpool-II to a strange state: there's no<br>
primary node if the failed node was a primary node (even if new<br>
primary node exists as a result of promotion of existing standby).<br>
<br>
See [pgpool-hackers: 2321] for more details.<br>
<br>
In the commit I did this:<br>
<br>
+ /*<br>
+ * if the primary node id is not loaded by watchdog, search for it<br>
+ */<br>
+ if (Req_info->primary_node_id < 0)<br>
+ {<br>
+ /* Save primary node id */<br>
+ Req_info->primary_node_id = find_primary_node_repeatedly()<wbr>;<br>
+ }<br>
+<br>
<br>
Since in 3.4 Req_info->primary_node_id is initialized to 0,<br>
primary_node_repeatedly() is not called at the start up and this makes<br>
3.4 is not workable when the primary node is other than 0.<br>
<br>
I think we need to add following into 3.4:<br>
<br>
Req_info->primary_node_id = -2;<br>
<br>
But I am not sure I am right because there maybe a reason why you<br>
did't backpatch bda946e718fe6f3605eb7e82ada875<wbr>4bd84a279c to 3.4.<br>
<br>
Can you please explain why you didn't back patch it?<br>
<br>
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_<wbr>en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
______________________________<wbr>_________________<br>
pgpool-hackers mailing list<br>
<a href="mailto:pgpool-hackers@pgpool.net">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/<wbr>listinfo/pgpool-hackers</a><br>
</blockquote></div><br></div></div>