<div dir="ltr">Hi <span class="" style="background-color:yellow">Tatsuo</span><div><br><div style>Please find the updated patch which takes care of the comments and suggestions on the previous version.</div></div><div style>
Appart from documentation additions, the attached patch sets the default search_primary_node_timeout value to 10 and setting the same to 0 will make the pgpool-II to keep searching the primary node forever.</div><div style>
<br></div><div style>Thanks</div><div style>Muhammad Usama</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 27, 2013 at 7:32 PM, Tatsuo Ishii <span dir="ltr"><<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">> Hi Tatsuo<br>
><br>
> Thanks for the comments and review. I will submit the updated patch after<br>
> taking care of the comments.<br>
> Please just clarify on one of the points, what should be the correct<br>
> behaviour of setting the search_primary_node_timeout = 0<br>
><br>
> Retrying forever OR Try just one time.?<br>
><br>
> Thanks<br>
> Usama<br>
<br>
</div>I vote for "retrying forever".<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>
> On Mon, May 27, 2013 at 7:07 PM, Tatsuo Ishii <<a href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>> wrote:<br>
><br>
>> Hi Usama,<br>
>><br>
>> Welcome to pgpool developer's community!<br>
>><br>
>> > I have been working on pgpool-II TODO item to add a new configuration<br>
>> > parameter for searching the primary node timeout after failover.<br>
>> Currently<br>
>> > pgpool-II uses "recovery_timeout" config parameter as a timeout for<br>
>> > searching the primary node after failover which is not originally meant<br>
>> for<br>
>> > the purpose.<br>
>> > The attached small patch is my first pgpool-II patch which adds the new<br>
>> > configuration parameter "search_primary_node_timeout", which can be used<br>
>> > for setting the timeout for searching the primary node after failover.<br>
>><br>
>> I have looked into the patch. Here'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 < pool_config->search_primary_node_timeout;<br>
>> 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's huge back log<br>
>> of WAL. What about set the default to 10?<br>
>> --<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>
</div></div></blockquote></div><br></div>