[pgpool-hackers: 262] Re: Patch for new parameter for searching primary node timeout

Muhammad Usama m.usama at gmail.com
Tue May 28 22:43:39 JST 2013


Hi Tatsuo

Please find the updated patch which takes care of the comments and
suggestions on the previous version.
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.

Thanks
Muhammad Usama



On Mon, May 27, 2013 at 7:32 PM, Tatsuo Ishii <ishii at postgresql.org> wrote:

> > Hi Tatsuo
> >
> > Thanks for the comments and review. I will submit the updated patch after
> > taking care of the comments.
> > Please just clarify on one of the points, what should be the correct
> > behaviour of setting the search_primary_node_timeout = 0
> >
> > Retrying forever OR  Try just one time.?
> >
> > Thanks
> > Usama
>
> I vote for "retrying forever".
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese: http://www.sraoss.co.jp
>
> > On Mon, May 27, 2013 at 7:07 PM, Tatsuo Ishii <ishii at postgresql.org>
> wrote:
> >
> >> Hi Usama,
> >>
> >> Welcome to pgpool developer's community!
> >>
> >> > I have been working on pgpool-II TODO item to add a new configuration
> >> > parameter for searching the primary node timeout after failover.
> >> Currently
> >> > pgpool-II uses "recovery_timeout" config parameter as a timeout for
> >> > searching the primary node after failover which is not originally
> meant
> >> for
> >> > the purpose.
> >> > The attached small patch is my first pgpool-II patch which adds the
> new
> >> > configuration parameter "search_primary_node_timeout", which can be
> used
> >> > for setting the timeout for searching the primary node after failover.
> >>
> >> I have looked into the patch. Here's my comment.  First, you need
> >> patch for doc/pgpool-en.html.
> >>
> >> Second,
> >>
> >> +search_primary_node_timeout = 90
> >> +                                   # Timeout in seconds to search for
> the
> >> +                                   # primary node at failover
> >> +                                   # 0 means no wait
> >>
> >> I am not sure what you suppose when search_primary_node_timeout = 0.
> >> If you mean retrying forever, the code below does not do that. Rather,
> >> find_primary_node() is never called, thus
> >> find_primary_node_repeatedly() always returns -1.
> >>
> >> +       for (sec = 0; sec < pool_config->search_primary_node_timeout;
> >> sec++)
> >>         {
> >>                 node_id = find_primary_node();
> >>
> >> Third, the default timeout 90 seconds seems too long. Promoting to
> >> primary should take less than 10 seconds unless there's huge back log
> >> of WAL. What about set the default to 10?
> >> --
> >> Tatsuo Ishii
> >> SRA OSS, Inc. Japan
> >> English: http://www.sraoss.co.jp/index_en.php
> >> Japanese: http://www.sraoss.co.jp
> >>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20130528/7e8bef76/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: param_spn_timeout_2.patch
Type: application/octet-stream
Size: 8277 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20130528/7e8bef76/attachment.obj>


More information about the pgpool-hackers mailing list