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

Ahsan Hadi ahsan.hadi at enterprisedb.com
Tue May 28 01:47:48 JST 2013


On Mon, May 27, 2013 at 6: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?
>

Yeah 10 seems more reasonable as a default. It is configurable so user can
change it if they want.



> --
> 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/20130527/9b9a32cd/attachment-0001.html>


More information about the pgpool-hackers mailing list