<div dir="ltr">Thanks Tatsuo.<div><br></div><div>Congratulations Usama for getting your first feature patch committed to pgpool.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 28, 2013 at 7:34 PM, Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Usama,<br>
<br>
Thanks for the patch. I did a simple test and it worked great. I have<br>
committed your patch along with Japanese doc (and slight editing of<br>
English doc).<br>
<div class="HOEnZb"><div class="h5">--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese: <a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
<br>
&gt; Hi Tatsuo<br>
&gt;<br>
&gt; Please find the updated patch which takes care of the comments and<br>
&gt; suggestions on the previous version.<br>
&gt; Appart from documentation additions, the attached patch sets the default<br>
&gt; search_primary_node_timeout value to 10 and setting the same to 0 will make<br>
&gt; the pgpool-II to keep searching the primary node forever.<br>
&gt;<br>
&gt; Thanks<br>
&gt; Muhammad Usama<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Mon, May 27, 2013 at 7:32 PM, Tatsuo Ishii &lt;<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; &gt; Hi Tatsuo<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks for the comments and review. I will submit the updated patch after<br>
&gt;&gt; &gt; taking care of the comments.<br>
&gt;&gt; &gt; Please just clarify on one of the points, what should be the correct<br>
&gt;&gt; &gt; behaviour of setting the search_primary_node_timeout = 0<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Retrying forever OR  Try just one time.?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks<br>
&gt;&gt; &gt; Usama<br>
&gt;&gt;<br>
&gt;&gt; I vote for &quot;retrying forever&quot;.<br>
&gt;&gt; --<br>
&gt;&gt; Tatsuo Ishii<br>
&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
&gt;&gt; Japanese: <a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
&gt;&gt;<br>
&gt;&gt; &gt; On Mon, May 27, 2013 at 7:07 PM, Tatsuo Ishii &lt;<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; Hi Usama,<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Welcome to pgpool developer&#39;s community!<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt; I have been working on pgpool-II TODO item to add a new configuration<br>
&gt;&gt; &gt;&gt; &gt; parameter for searching the primary node timeout after failover.<br>
&gt;&gt; &gt;&gt; Currently<br>
&gt;&gt; &gt;&gt; &gt; pgpool-II uses &quot;recovery_timeout&quot; config parameter as a timeout for<br>
&gt;&gt; &gt;&gt; &gt; searching the primary node after failover which is not originally<br>
&gt;&gt; meant<br>
&gt;&gt; &gt;&gt; for<br>
&gt;&gt; &gt;&gt; &gt; the purpose.<br>
&gt;&gt; &gt;&gt; &gt; The attached small patch is my first pgpool-II patch which adds the<br>
&gt;&gt; new<br>
&gt;&gt; &gt;&gt; &gt; configuration parameter &quot;search_primary_node_timeout&quot;, which can be<br>
&gt;&gt; used<br>
&gt;&gt; &gt;&gt; &gt; for setting the timeout for searching the primary node after failover.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I have looked into the patch. Here&#39;s my comment.  First, you need<br>
&gt;&gt; &gt;&gt; patch for doc/pgpool-en.html.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Second,<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; +search_primary_node_timeout = 90<br>
&gt;&gt; &gt;&gt; +                                   # Timeout in seconds to search for<br>
&gt;&gt; the<br>
&gt;&gt; &gt;&gt; +                                   # primary node at failover<br>
&gt;&gt; &gt;&gt; +                                   # 0 means no wait<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I am not sure what you suppose when search_primary_node_timeout = 0.<br>
&gt;&gt; &gt;&gt; If you mean retrying forever, the code below does not do that. Rather,<br>
&gt;&gt; &gt;&gt; find_primary_node() is never called, thus<br>
&gt;&gt; &gt;&gt; find_primary_node_repeatedly() always returns -1.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; +       for (sec = 0; sec &lt; pool_config-&gt;search_primary_node_timeout;<br>
&gt;&gt; &gt;&gt; sec++)<br>
&gt;&gt; &gt;&gt;         {<br>
&gt;&gt; &gt;&gt;                 node_id = find_primary_node();<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Third, the default timeout 90 seconds seems too long. Promoting to<br>
&gt;&gt; &gt;&gt; primary should take less than 10 seconds unless there&#39;s huge back log<br>
&gt;&gt; &gt;&gt; of WAL. What about set the default to 10?<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; Tatsuo Ishii<br>
&gt;&gt; &gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; &gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
&gt;&gt; &gt;&gt; Japanese: <a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt;<br>
</div></div><div class="HOEnZb"><div class="h5">_______________________________________________<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" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Ahsan Hadi<br>Snr Director Product Development<br>EnterpriseDB Corporation<br>The Enterprise Postgres Company<br><br>Phone: +92-51-8358874    <br>Mobile: +92-333-5162114<br>
<br>Website: <a href="http://www.enterprisedb.com">www.enterprisedb.com</a><br>EnterpriseDB Blog: <a href="http://blogs.enterprisedb.com/">http://blogs.enterprisedb.com/</a><br>Follow us on Twitter: <a href="http://www.twitter.com/enterprisedb">http://www.twitter.com/enterprisedb</a><br>
<br>This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.
</div>