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