[pgpool-general: 6012] Going back to "Raw Mode"

Jeff Schmidt jeff.schmidt at physicianspharmacy.com
Tue Apr 3 23:33:19 JST 2018


I've inherited a PGPool/Postgres implementation. My predecessor had tried (and failed) to get streaming replication configured. Of course, he didn't leave and documentation about what changes he made during the process. The end result is that we have only one Postgres instance, but PGPool is still set to failover to the (now nonexistent) node.  Every once in a while, something will hiccup and PGPool will failover to the nonexistent node and our production system is down until somebody logs in and issues the "pg_attach_node 0" command.

I'm trying to change PGPool to what I believe is Raw Mode so it won't try to failover. From what I've gathered, I think I just need to set replication_mode=off, load_balance_mode=off, and master_slave_mode=off. However, I have no confidence that I'm correct and that I'm not missing anything. Can somebody point me in the right direction?

The current configuration (minus a few things that seemed wildly irrelevant to this discussion) is:
listen_addresses = '*'
port = 5432
socket_dir = '/tmp'

pcp_port = 9898
pcp_socket_dir = '/tmp'

# - Backend Connection Settings -
backend_hostname0 = '172.26.1.50'
backend_port0 = 9999
backend_weight0 = 1
backend_data_directory0 = '/postgresdb'
#backend_flag0 = 'ALLOW_TO_FAILOVER'
backend_hostname1 = 'ppasv59g'
backend_port1 = 9999
backend_weight1 = 1
backend_data_directory1 = '/postgresdb'
#backend_flag1 = 'ALLOW_TO_FAILOVER'

# - Authentication -
enable_pool_hba = on
pool_passwd = 'pool_passwd'
authentication_timeout = 60

# - SSL Connections -
ssl = off
#------------------------------------------------------------------------------
# POOLS
#------------------------------------------------------------------------------

# - Pool size -
num_init_children = 500
max_pool = 1

# - Life time -
child_life_time = 300
child_max_connections = 0
connection_life_time = 0
client_idle_limit = 0

#------------------------------------------------------------------------------
# CONNECTION POOLING
#------------------------------------------------------------------------------
connection_cache = on
reset_query_list = 'ABORT; DISCARD ALL'
#reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'

#------------------------------------------------------------------------------
# REPLICATION MODE
#------------------------------------------------------------------------------
replication_mode = on
replicate_select = off
insert_lock = on
lobj_lock_table = ''

# - Degenerate handling -
replication_stop_on_mismatch = on
failover_if_affected_tuples_mismatch = on

#------------------------------------------------------------------------------
# LOAD BALANCING MODE
#------------------------------------------------------------------------------
load_balance_mode = on
ignore_leading_white_space = on
white_function_list = ''
black_function_list = 'nextval,setval,pg_start_backup,pg_stop_backup,pg_switch_xlog'

#------------------------------------------------------------------------------
# MASTER/SLAVE MODE
#------------------------------------------------------------------------------
master_slave_mode = off
master_slave_sub_mode = 'slony'

# - Streaming -
sr_check_period = 0
sr_check_user = 'nobody'
sr_check_password = ''
delay_threshold = 0

# - Special commands -
follow_master_command = ''
#------------------------------------------------------------------------------
# PARALLEL MODE
#------------------------------------------------------------------------------
parallel_mode = off
pgpool2_hostname = ''

# - System DB info -
system_db_hostname  = 'localhost'
system_db_port = 9999
system_db_dbname = 'pgpool'
system_db_schema = 'pgpool_catalog'
                                   # (change requires restart)
system_db_user = 'pgpool'
                                   # (change requires restart)
system_db_password = ''
                                   # (change requires restart)


#------------------------------------------------------------------------------
# HEALTH CHECK
#------------------------------------------------------------------------------
health_check_period = 30
health_check_timeout = 20
health_check_user = 'postgres'
health_check_password = 'NOPE'
health_check_max_retries = 0
health_check_retry_delay = 1


#------------------------------------------------------------------------------
# FAILOVER AND FAILBACK
#------------------------------------------------------------------------------

failover_command = 'echo host:%h, new master id:%m, old master id:%M | mail -s pgpool\ failover anemail at address'
failback_command = 'echo host:%h, new master id:%m, old master id:%M | mail -s pgpool\ failback anemail at address'
fail_over_on_backend_error = on
search_primary_node_timeout = 10

recovery_user = 'ausername'
recovery_password = 'NOPE'
recovery_1st_stage_command = 'copy_base_backup'
recovery_2nd_stage_command = 'pgpool_recovery_pitr'
recovery_timeout = 30
client_idle_limit_in_recovery = -1

#------------------------------------------------------------------------------
# WATCHDOG
#------------------------------------------------------------------------------
use_watchdog = off

# -Connection to up stream servers -
trusted_servers = ''
ping_path = '/bin'

# - Watchdog communication Settings -
wd_hostname = ''
wd_port = 9000
wd_authkey = ''

# - Virtual IP control Setting -
delegate_IP = ''
ifconfig_path = '/sbin'
if_up_cmd = 'ifconfig eth0:0 inet $_IP_$ netmask 255.255.255.0'
if_down_cmd = 'ifconfig eth0:0 down'

arping_path = '/usr/sbin'           # arping command path

arping_cmd = 'arping -U $_IP_$ -w 1'

# - Behaivor on escalation Setting -
clear_memqcache_on_escalation = on
wd_escalation_command = ''
wd_lifecheck_method = 'heartbeat'
wd_interval = 10

# -- heartbeat mode --
wd_heartbeat_port = 9694
wd_heartbeat_keepalive = 2
wd_heartbeat_deadtime = 30
heartbeat_destination0 = 'host0_ip1'
heartbeat_destination_port0 = 9694
heartbeat_device0 = ''

# -- query mode --
wd_life_point = 3
wd_lifecheck_query = 'SELECT 1'
wd_lifecheck_dbname = 'template1'
wd_lifecheck_user = 'nobody'
wd_lifecheck_password = ''

# - Other pgpool Connection Settings -
#other_pgpool_hostname0 = 'host0'
#other_pgpool_port0 = 5432
#other_wd_port0 = 9000
#other_pgpool_hostname1 = 'host1'
#other_pgpool_port1 = 5432
#other_wd_port1 = 9000

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20180403/9fc783f6/attachment.html>


More information about the pgpool-general mailing list