[pgpool-general: 4373] 2 issues: ifconfig fails with service pgpool2 stop in debian 8 - pgpool status sync

Job Cespedes jobcespedes at gmail.com
Mon Feb 1 01:24:43 JST 2016


Postgres = 9.4.5-0+deb8u1
PGPool2 = 3.3.4-1
Debian = 8.2

I’m experiencing several issues with Debian 8 and pgpool2 (master – slave
with streaming replication). Any piece of advice is very welcome.

1)     ifconfig down fails for delegate IP
a)    When stoping service with “service pgpool2 stop” it always fails
b)    When stoping service with “systemctl stop pgpool2” it seldom fails

2)    Postgres backends status is not sync with watchdog.
a.    Scenerio: Two pgpools (pg1 is master pg2 is slave), pg1 is stopped,
pg2 becomes master. While pg2 is master, postgresql service in standby
node  is stopped. pg2  is stopped. postgresql service in standby node  is
started. Pg1 ang pg2 are started, but they have different status for
postgresql backends. Is this the expected behavior? This has happen in
stress testing when network seems to become instable and pg2 cannot
communicate with pg1.

Thanks,

pg1 pgpool.conf

listen_addresses = '*'
port = 5432
socket_dir = '/var/run/postgresql'
pcp_port = 9898
pcp_socket_dir = '/var/run/postgresql'
backend_hostname0 = 'pg1'
backend_port0 = 5433
backend_weight0 = 1
backend_data_directory0 = '/var/lib/postgresql/9.4/main'
backend_flag0 = 'ALLOW_TO_FAILOVER'
backend_hostname1 = 'pg2'
backend_port1 = 5433
backend_weight1 = 1
backend_data_directory1 = '/var/lib/postgresql/9.4/main'
backend_flag1 = 'ALLOW_TO_FAILOVER'
enable_pool_hba = on
pool_passwd = 'pool_passwd'
authentication_timeout = 60
ssl = off
num_init_children = 300
max_pool = 3
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 = on
log_statement = off
log_per_node_statement = off
log_standby_delay = 'if_over_threshold'
syslog_facility = 'LOCAL0'
syslog_ident = 'pgpool'
debug_level = 0
pid_file_name = '/var/run/postgresql/pgpool.pid'
logdir = '/var/log/postgresql'
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,lastval,currval'
master_slave_mode = on
master_slave_sub_mode = 'stream'
sr_check_period = 10
sr_check_user = 'postgres'
sr_check_password = 'password'
delay_threshold = 1
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'
system_db_password = ''
health_check_period = 5
health_check_timeout = 20
health_check_user = 'postgres'
health_check_password = 'password'
health_check_max_retries = 2
health_check_retry_delay = 1
failover_command = '/var/lib/postgresql/9.4/main/failover.sh %d %P %H %R %h
%p %D %m %H %M'
failback_command = '/var/lib/postgresql/9.4/main/failback.sh %d %h %p %D %m'
fail_over_on_backend_error = off
search_primary_node_timeout = 10
recovery_user = 'postgres'
recovery_password = 'password'
recovery_1st_stage_command = 'recovery_1st_stage'
recovery_2nd_stage_command = ''
recovery_timeout = 90
client_idle_limit_in_recovery = 0
use_watchdog = on
trusted_servers = ''
ping_path = '/bin'
wd_hostname = 'pg1' #differs in standby
wd_port = 9000
wd_authkey = ''
delegate_IP = '172.16.49.224'
ifconfig_path = '/usr/bin' #sudo path
if_up_cmd = 'sudo /sbin/ifconfig eth0:0 inet $_IP_$ netmask 255.255.255.0
up'
if_down_cmd = 'sudo /sbin/ifconfig eth0:0 down'
arping_path = '/usr/bin' #sudo path
arping_cmd = 'sudo /usr/sbin/arping -U $_IP_$ -w 10000 -c 3'
clear_memqcache_on_escalation = on
wd_escalation_command = ''
wd_lifecheck_method = 'heartbeat'
wd_interval = 3
wd_heartbeat_port = 9694
wd_heartbeat_keepalive = 2
wd_heartbeat_deadtime = 30
heartbeat_destination0 = 'pg2' #differs in standby
heartbeat_destination_port0 = 9694
heartbeat_device0 = ''
wd_life_point = 3
wd_lifecheck_query = 'SELECT 1'
heartbeat_destination_port0 = 9694
heartbeat_device0 = ''
wd_life_point = 3
wd_lifecheck_query = 'SELECT 1'
wd_lifecheck_dbname = 'template1'
wd_lifecheck_user = 'nobody'
wd_lifecheck_password = ''
other_pgpool_hostname0 = 'pg2' #differs in standby
other_pgpool_port0 = 5432
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 = ''

-- 
Job Céspedes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20160131/cfabd22f/attachment.html>


More information about the pgpool-general mailing list