[pgpool-general: 2372] Re: Loss of client connection when standby is rebooted

Tatsuo Ishii ishii at postgresql.org
Sun Jan 5 18:51:31 JST 2014


Yes, that's the expected behavior.  Pgpool-II triggers failover if
standby goes down even if health check retry is set. This is because
pgpool-II detects shutdown command was executed on the backend
(remember that restart = shutdown + start in PostgreSQL).

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

> I am running postgres 9.2.6 in streaming replication mode with pgpool 3.3.1
> in master slave mode.  I have db1 with postgres and pgpool, and db2 with
> postgres and pgpool.  The delegate/floating IP is 10.10.10.234.  When I
> have one of the db's as both master database and master pgpool with the ip
> bound to it, and a client connected in using the delegate, and I reboot db2
> (the standby), the client looses their connection.  Is this expected?  I
> did not expect for the client to see any impact when I reboot the standby
> postgres/pgpool server.  Below is my config.
> 
> Thanks!
> 
> 
> 
> My config:
> 
> listen_addresses = '*'
> port = 9999
> socket_dir = '/var/run/pgpool'
> pcp_port = 9898
> pcp_socket_dir = '/var/run/pgpool'
> pcp_timeout = 100
> backend_hostname0 = '10.10.10.133'
> backend_port0 = 5432
> backend_weight0 = 1
> backend_data_directory0 = '/var/lib/pgsql/9.2/data'
> backend_flag0 = 'ALLOW_TO_FAILOVER'
> backend_hostname1 = '10.10.10.233'
> backend_port1 = 5432
> backend_weight1 = 1
> backend_data_directory1 = '/var/lib/pgsql/9.2/data'
> backend_flag1 = 'ALLOW_TO_FAILOVER'
> enable_pool_hba = on
> authentication_timeout = 15
> ssl = off
> num_init_children = 32
> max_pool = 4
> child_life_time = 300
> child_max_connections = 0
> connection_life_time = 0
> client_idle_limit = 0
> log_destination = 'stderr'
> print_timestamp = on
> log_connections = off
> log_hostname = off
> log_statement = off
> log_per_node_statement = off
> log_standby_delay = 'none'
> syslog_facility = 'LOCAL0'
> syslog_ident = 'pgpool'
> debug_level = 0
> pid_file_name = '/var/run/pgpool/pgpool.pid'
> logdir = '/var/log/pgpool'
> connection_cache = on
> reset_query_list = 'ABORT; DISCARD ALL'
> replication_mode = off
> replicate_select = off
> insert_lock = on
> lobj_lock_table = ''
> replication_stop_on_mismatch = off
> failover_if_affected_tuples_mismatch = off
> load_balance_mode = off
> ignore_leading_white_space = on
> white_function_list = ''
> black_function_list = 'nextval,setval'
> master_slave_mode = on
> master_slave_sub_mode = 'stream'
> sr_check_period = 0
> sr_check_user = 'health_check'
> delay_threshold = 0
> follow_master_command = ''
> parallel_mode = off
> pgpool2_hostname = ''
> system_db_hostname  = 'localhost'
> system_db_port = 5432
> system_db_dbname = 'pgpool'
> system_db_schema = 'pgpool_catalog'
> system_db_user = 'pgpool'
> health_check_period = 5
> health_check_timeout = 20
> health_check_user = 'health_check'
> health_check_max_retries = 1
> health_check_retry_delay = 1
> failover_command = '/var/lib/pgsql/9.2/failover.sh %d %P %H %R'
> failback_command = ''
> fail_over_on_backend_error = on
> search_primary_node_timeout = 10
> recovery_user = 'nobody'
> recovery_password = ''
> recovery_1st_stage_command = '/var/lib/pgsql/9.2/online_recovery.sh'
> recovery_2nd_stage_command = ''
> recovery_timeout = 90
> client_idle_limit_in_recovery = 0
> use_watchdog = on
> trusted_servers = ''
> delegate_IP = '10.10.10.234'
> wd_hostname = '10.10.10.233'
> wd_port = 9000
> wd_interval = 3
> ping_path = '/bin/'
> ifconfig_path = '/var/lib/pgsql/sbin/'
> if_up_cmd = 'ifconfig eth1:0 inet 10.10.10.234 netmask 255.255.255.128'
> if_down_cmd = 'ifconfig eth1:0 down'
> arping_cmd = 'arping -U $_IP_$ -w 1'
> wd_life_point = 3
> wd_lifecheck_query = 'SELECT 1'
> wd_lifecheck_dbname = 'template1'
> wd_lifecheck_user = 'health_check'
> wd_lifecheck_password = 'foo1234'
> other_pgpool_hostname0 = '10.10.10.133'
> other_pgpool_port0 = 9999
> other_wd_port0 = 9000
> relcache_expire = 0
> relcache_size = 256
> check_temp_table = on
> memory_cache_enabled = off
> memqcache_method = 'shmem'
> memqcache_memcached_host = 'localhost'
> memqcache_memcached_port = 11211
> memqcache_total_size = 67108864
> memqcache_max_num_cache = 1000000
> memqcache_expire = 0
> memqcache_auto_cache_invalidation = on
> memqcache_maxcache = 409600
> memqcache_cache_block_size = 1048576
> memqcache_oiddir = '/var/log/pgpool/oiddir'
> white_memqcache_table_list = ''
> black_memqcache_table_list = ''
> wd_heartbeat_port = 9694
> wd_heartbeat_deadtime = 20
> heartbeat_destination0 = '10.10.10.133'
> heartbeat_destination_port0 = 9694
> heartbeat_device0 = 'eth1'


More information about the pgpool-general mailing list