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

Ahsan Hadi ahsan.hadi at enterprisedb.com
Tue May 28 23:36:49 JST 2013


Thanks Tatsuo.

Congratulations Usama for getting your first feature patch committed to
pgpool.



On Tue, May 28, 2013 at 7:34 PM, Tatsuo Ishii <ishii at postgresql.org> wrote:

> Hi Usama,
>
> Thanks for the patch. I did a simple test and it worked great. I have
> committed your patch along with Japanese doc (and slight editing of
> English doc).
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese: http://www.sraoss.co.jp
>
> > 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
> >> >>
> >>
> _______________________________________________
> pgpool-hackers mailing list
> pgpool-hackers at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-hackers
>



-- 
Ahsan Hadi
Snr Director Product Development
EnterpriseDB Corporation
The Enterprise Postgres Company

Phone: +92-51-8358874
Mobile: +92-333-5162114

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20130528/cc26d1d6/attachment-0001.html>


More information about the pgpool-hackers mailing list