<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 27, 2013 at 6:07 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>
Welcome to pgpool developer&#39;s community!<br>
<div><div class="h5"><br>
&gt; I have been working on pgpool-II TODO item to add a new configuration<br>
&gt; parameter for searching the primary node timeout after failover. Currently<br>
&gt; pgpool-II uses &quot;recovery_timeout&quot; config parameter as a timeout for<br>
&gt; searching the primary node after failover which is not originally meant for<br>
&gt; the purpose.<br>
&gt; The attached small patch is my first pgpool-II patch which adds the new<br>
&gt; configuration parameter &quot;search_primary_node_timeout&quot;, which can be used<br>
&gt; for setting the timeout for searching the primary node after failover.<br>
<br>
</div></div>I have looked into the patch. Here&#39;s my comment.  First, you need<br>
patch for doc/pgpool-en.html.<br>
<br>
Second,<br>
<br>
+search_primary_node_timeout = 90<br>
+                                   # Timeout in seconds to search for the<br>
+                                   # primary node at failover<br>
+                                   # 0 means no wait<br>
<br>
I am not sure what you suppose when search_primary_node_timeout = 0.<br>
If you mean retrying forever, the code below does not do that. Rather,<br>
find_primary_node() is never called, thus<br>
find_primary_node_repeatedly() always returns -1.<br>
<br>
+       for (sec = 0; sec &lt; pool_config-&gt;search_primary_node_timeout; sec++)<br>
        {<br>
                node_id = find_primary_node();<br>
<br>
Third, the default timeout 90 seconds seems too long. Promoting to<br>
primary should take less than 10 seconds unless there&#39;s huge back log<br>
of WAL. What about set the default to 10?<br></blockquote><div><br></div><div style>Yeah 10 seems more reasonable as a default. It is configurable so user can change it if they want.</div><div style><br></div><div style>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
--<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>
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>
</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></div>