<div dir="ltr"><div>Hi Yugo,<br><br></div>Is default value of wd_heartbeat_deadtime still 30? I don't see it in the documentation manual...<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 1, 2014 at 2:10 AM, Yugo Nagata <span dir="ltr"><<a href="mailto:nagata@sraoss.co.jp" target="_blank">nagata@sraoss.co.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sun, 29 Jun 2014 22:27:20 -0700<br>
Alexandru Cardaniuc <<a href="mailto:cardaniuc@gmail.com">cardaniuc@gmail.com</a>> wrote:<br>
<br>
><br>
> wd_heartbeat_deadtime V3.3 -<br>
>     If there are no heartbeat signal for the period specified by this option, watchdog regards it as failure of the remote pgpool-II. This works only heartbeat mode.<br>
>     You need to restart pgpool-II if you change this value.<br>
><br>
> I don't have that in my config and the documentation doesn't say it's 30<br>
> sec by default. Is it? Should I indicate it? What's a good default, I<br>
> guess 30 sec? :)<br>
<br>
</span>Oh, the default value is missing from document. I'll fix this.<br>
This is in pgpool.conf.sample;<br>
<br>
wd_heartbeat_deadtime = 30<br>
                                    # Deadtime interval for heartbeat signal (sec)<br>
<br>
I think this is a reasonable value as default since this is the same as<br>
Heartbeat (Pacemaker), which is a major clustering software.<br>
<div><div class="h5"><br>
><br>
><br>
> Yugo Nagata <<a href="mailto:nagata@sraoss.co.jp">nagata@sraoss.co.jp</a>> writes:<br>
><br>
> > Hi,<br>
> ><br>
> > On Sat, 21 Jun 2014 22:49:57 -0700 Alexandru Cardaniuc<br>
> > <<a href="mailto:cardaniuc@gmail.com">cardaniuc@gmail.com</a>> wrote:<br>
> ><br>
> >>  Hi All,<br>
> >><br>
> >> Need some validation of the configuration that I did for the cluster<br>
> >> of 2 pgpools with a cluster of 2 PostgreSQL 9.3 databases. I went<br>
> >> through all the documentation, but in some places it's not<br>
> >> completely clear, so I am not sure if I misunderstood some of the<br>
> >> things.<br>
> >><br>
> >> Here's the info.<br>
> >><br>
> >> Pgpool version: 3.3.3 and using watchdog (2 pgpools: 1 primary, 1<br>
> >> standby)<br>
> >><br>
> >> PostgreSQL version 9.3 (cluster of 2 databases with streaming<br>
> >> replication and hot standby configured).<br>
> >><br>
> >> This is my relevant PostgreSQL 9.3 config:<br>
> >> ------------------------------------------ listen_addresses = '*'<br>
> >> port = 5432 max_connections = 550 superuser_reserved_connections = 3<br>
> >> wal_level = hot_standby checkpoint_segments = 10<br>
> >> checkpoint_completion_target = 0.9 max_wal_senders = 10<br>
> >> wal_keep_segments = 100 hot_standby = on<br>
> >> ------------------------------------------ The documentation states<br>
> >> that: "To enable read-only queries on a standby server, wal_level<br>
> >> must be set to hot_standby on the primary, and hot_standby must be<br>
> >> enabled in the standby."<br>
> >><br>
> >> I use the same config above on both primary database and secondary<br>
> >> with the assumption that 'wal_level = hot_standby' is ignored on the<br>
> >> slave and 'hot_standby = on' is ignored on the master.<br>
> >><br>
> >> Is that a correct assumption? That assumption shouldn't create any<br>
> >> issues during pgpool/postgres failover?<br>
> ><br>
> > No problem. In both nodes, you can wal_level=hot_standby and<br>
> > hot_standby=on.<br>
> ><br>
> >><br>
> >><br>
> >> Also, about the pgpool config. This is the pgpool config for the 1st<br>
> >> pgpool:<br>
> >> --------------------------------------------------------------------<br>
> >> listen_addresses = '*' port = 9999 socket_dir = '/var/run/pgpool'<br>
> >> pcp_port = 9898 pcp_socket_dir = '/var/run/pgpool' num_init_children<br>
> >> = 250 child_life_time = 300 child_max_connections = 0<br>
> >> client_idle_limit = 0 enable_pool_hba = false pool_passwd =<br>
> >> pool_passwd' authentication_timeout = 60 print_timestamp = true<br>
> >> log_connections = true log_hostname = false log_statement = true<br>
> >> log_per_node_statement = false debug_level = 0 pid_file_name =<br>
> >> /var/run/pgpool/pgpool.pid' logdir = '/var/run/pgpool'<br>
> >> connection_cache = false health_check_period = 60<br>
> >> health_check_timeout = 15 health_check_user = 'postgres'<br>
> >> health_check_password = 'password' health_check_max_retries = 3<br>
> >> health_check_retry_delay = 1 search_primary_node_timeout = 10<br>
> >> failover_command = '/store/pgdata/failover_stream.sh %d %P %H %R<br>
> >> postgresql.trigger' failback_command = 'echo $(date) host:%h, new<br>
> >> master id:%m, old master id:%M >> /var/log/pgpool/failback.log'<br>
> >> follow_master_command = 'echo $(date) host:%h, new master id:%m, old<br>
> >> master id:%M >> /var/log/pgpool/master_failover.log'<br>
> >> fail_over_on_backend_error = false ignore_leading_white_space = true<br>
> >> backend_hostname0 = '10.0.90.11' backend_port0 = 5432<br>
> >> backend_weight0 = 1 backend_data_directory0 = '/store/pgdata'<br>
> >> backend_flag0 = 'ALLOW_TO_FAILOVER' backend_hostname1 = '10.0.90.12'<br>
> >> backend_port1 = 5432 backend_weight1 = 1 backend_data_directory1 =<br>
> >> /store/pgdata' backend_flag1 = 'ALLOW_TO_FAILOVER' ssl = false<br>
> >> max_pool = 1 connection_life_time = 0 reset_query_list = 'ABORT;<br>
> >> DISCARD ALL' replication_mode = false replication_stop_on_mismatch =<br>
> >> true replicate_select = false insert_lock = true recovery_user =<br>
> >> postgres' recovery_password = 'password' recovery_1st_stage_command<br>
> >> = 'base_backup.sh' recovery_2nd_stage_command = '' recovery_timeout<br>
> >> = 120 client_idle_limit_in_recovery = 1 lobj_lock_table = ''<br>
> >> master_slave_mode = true load_balance_mode = true<br>
> >> master_slave_sub_mode = 'stream' delay_threshold = 0 sr_check_period<br>
> >> = 0 sr_check_user = 'postgres' sr_check_password = 'password'<br>
> >> log_standby_delay = 'none' parallel_mode = false system_db_hostname<br>
> >> = 'localhost' system_db_port = 5432 system_db_dbname = 'pgpool'<br>
> >> system_db_schema = 'pgpool_catalog' system_db_user = 'pgpool'<br>
> >> system_db_password = '' pgpool2_hostname = '' memory_cache_enabled =<br>
> >> off use_watchdog = on wd_hostname = '10.0.90.11' wd_port = 9000<br>
> >> delegate_IP = '10.0.90.1' ifconfig_path = '/store/pgdata/sbin'<br>
> >> if_up_cmd = 'ifconfig eth0:0 inet $_IP_$ netmask 255.255.0.0'<br>
> >> if_down_cmd = 'ifconfig eth0:0 down' arping_path =<br>
> >> /store/pgdata/sbin' arping_cmd = 'arping -U $_IP_$ -w 1'<br>
> >> wd_lifecheck_method = 'heartbeat' wd_interval = 10 wd_heartbeat_port<br>
> >> = 9694 wd_heartbeat_keepalive = 2 heartbeat_destination0 =<br>
> >> 10.0.90.12' heartbeat_destination_port0 = 9694<br>
> >> other_pgpool_hostname0 = '10.0.90.12' other_pgpool_port0 = 9999<br>
> >> other_wd_port0 = 9000<br>
> >> --------------------------------------------------------------------<br>
> >><br>
> >> second pgpool config file:<br>
> >> --------------------------------------------------------------------<br>
> >> listen_addresses = '*' port = 9999 socket_dir = '/var/run/pgpool'<br>
> >> pcp_port = 9898 pcp_socket_dir = '/var/run/pgpool' num_init_children<br>
> >> = 250 child_life_time = 300 child_max_connections = 0<br>
> >> client_idle_limit = 0 enable_pool_hba = false pool_passwd =<br>
> >> pool_passwd' authentication_timeout = 60 print_timestamp = true<br>
> >> log_connections = true log_hostname = false log_statement = true<br>
> >> log_per_node_statement = false debug_level = 0 pid_file_name =<br>
> >> /var/run/pgpool/pgpool.pid' logdir = '/var/run/pgpool'<br>
> >> connection_cache = false health_check_period = 60<br>
> >> health_check_timeout = 15 health_check_user = 'postgres'<br>
> >> health_check_password = 'password' health_check_max_retries = 3<br>
> >> health_check_retry_delay = 1 search_primary_node_timeout = 10<br>
> >> failover_command = '/store/pgdata/failover_stream.sh %d %P %H %R<br>
> >> postgresql.trigger' failback_command = 'echo $(date) host:%h, new<br>
> >> master id:%m, old master id:%M >> /var/log/pgpool/failback.log'<br>
> >> follow_master_command = 'echo $(date) host:%h, new master id:%m, old<br>
> >> master id:%M >> /var/log/pgpool/master_failover.log'<br>
> >> fail_over_on_backend_error = false ignore_leading_white_space = true<br>
> >> backend_hostname0 = '10.0.90.11' backend_port0 = 5432<br>
> >> backend_weight0 = 1 backend_data_directory0 = '/store/pgdata'<br>
> >> backend_flag0 = 'ALLOW_TO_FAILOVER' backend_hostname1 = '10.0.90.12'<br>
> >> backend_port1 = 5432 backend_weight1 = 1 backend_data_directory1 =<br>
> >> /store/pgdata' backend_flag1 = 'ALLOW_TO_FAILOVER' ssl = false<br>
> >> max_pool = 1 connection_life_time = 0 reset_query_list = 'ABORT;<br>
> >> DISCARD ALL' replication_mode = false replication_stop_on_mismatch =<br>
> >> true replicate_select = false insert_lock = true recovery_user =<br>
> >> postgres' recovery_password = 'password' recovery_1st_stage_command<br>
> >> = 'base_backup.sh' recovery_2nd_stage_command = '' recovery_timeout<br>
> >> = 120 client_idle_limit_in_recovery = 1 lobj_lock_table = ''<br>
> >> master_slave_mode = true load_balance_mode = true<br>
> >> master_slave_sub_mode = 'stream' delay_threshold = 0 sr_check_period<br>
> >> = 0 sr_check_user = 'postgres' sr_check_password = 'password'<br>
> >> log_standby_delay = 'none' parallel_mode = false system_db_hostname<br>
> >> = 'localhost' system_db_port = 5432 system_db_dbname = 'pgpool'<br>
> >> system_db_schema = 'pgpool_catalog' system_db_user = 'pgpool'<br>
> >> system_db_password = '' pgpool2_hostname = '' memory_cache_enabled =<br>
> >> off use_watchdog = on wd_hostname = '10.0.90.12' wd_port = 9000<br>
> >> delegate_IP = '10.0.90.1' ifconfig_path = '/store/pgdata/sbin'<br>
> >> if_up_cmd = 'ifconfig eth0:0 inet $_IP_$ netmask 255.255.0.0'<br>
> >> if_down_cmd = 'ifconfig eth0:0 down' arping_path =<br>
> >> /store/pgdata/sbin' arping_cmd = 'arping -U $_IP_$ -w 1'<br>
> >> wd_lifecheck_method = 'heartbeat' wd_interval = 10 wd_heartbeat_port<br>
> >> = 9694 wd_heartbeat_keepalive = 2 heartbeat_destination0 =<br>
> >> 10.0.90.11' heartbeat_destination_port0 = 9694<br>
> >> other_pgpool_hostname0 = '10.0.90.11' other_pgpool_port0 = 9999<br>
> >> other_wd_port0 = 9000<br>
> >> --------------------------------------------------------------------<br>
> >><br>
> >> Anything wrong or missing in the configs? I need a cluster of<br>
> >> pgpools with watchdog and healthchecks monitoring a cluster of<br>
> >> postgres databases with streaming replication setup.<br>
> ><br>
> > I think no problem. I can't find heartbeat_deadtime, but I assume this<br>
> > is default value 30.<br>
> ><br>
> >>  Any help in review or suggestions based on your knowledge or<br>
> >> experience will be appreciated.<br>
> >><br>
> >> Sincerely, Alexandru<br>
> >><br>
> >> -- "A journey of a thousand miles begins with a single step." -<br>
> >> Ancient Proverb _______________________________________________<br>
> >> pgpool-general mailing list <a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>
> >> <a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
><br>
> --<br>
> "The man who has gotten everything he wants is all in favor of peace<br>
> and order."<br>
> - Jawaharlal Nehru<br>
> _______________________________________________<br>
> pgpool-general mailing list<br>
> <a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>
> <a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
<br>
<br>
--<br>
</div></div>Yugo Nagata <<a href="mailto:nagata@sraoss.co.jp">nagata@sraoss.co.jp</a>><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Sincerely yours,<br>Alexandru Cardaniuc</div>
</div>