backend_clustering_mode = 'streaming_replication'
listen_addresses = '*'
port = 9999
socket_dir = '/run/pgpool-II'
pcp_listen_addresses = '*'

backend_application_name0 = 'cdis000phaux448.cdis.cz'
backend_application_name1 = 'cdis000phaux449.cdis.cz'

backend_hostname0 = 'cdis000phaux448.cdis.cz'
backend_port0 = 5432
backend_weight0 = 1
backend_data_directory0 = '/var/lib/pgsql/data/17/DB1'
backend_flag0 = 'ALLOW_TO_FAILOVER'
backend_hostname1 = 'cdis000phaux449.cdis.cz'
backend_port1 = 5432
backend_weight1 = 1
backend_data_directory1 = '/var/lib/pgsql/data/17/DB1'
backend_flag1 = 'ALLOW_TO_FAILOVER'

enable_pool_hba = on

log_destination = 'stderr'

log_connections = on
log_disconnections = on
log_hostname = on
log_statement = off
log_per_node_statement = off
#log_min_messages = debug5             # values in order of decreasing detail:


logging_collector = on

log_directory = '/var/log/pgpool_log'
log_filename = 'pgpool-%Y-%m-%d.log'

log_truncate_on_rotation = off

debug_level = 1

log_rotation_age = 1d
#log_rotation_size = 10MB

pid_file_name = '/run/pgpool/pgpool.pid'


load_balance_mode = on

sr_check_user = 'pgpool'
sr_check_password = ''

follow_primary_command = '/etc/pgpool-II/follow_primary.sh %d %h %p %D %m %H %M %P %r %R'

health_check_period = 5
health_check_timeout = 60
health_check_user = 'pgpool'
health_check_password = ''
health_check_max_retries = 3

failover_command = '/etc/pgpool-II/failover.sh %d %h %p %D %m %H %M %P %r %R %N %S'

recovery_user = 'postgres'
recovery_password = ''
recovery_1st_stage_command = 'recovery_1st_stage'

use_watchdog = on

hostname0 = 'cdis000phaux445.cdis.cz'
wd_port0 = 9000
pgpool_port0 = 9999
hostname1 = 'cdis000phaux446.cdis.cz'
wd_port1 = 9000
pgpool_port1 = 9999
hostname2 = 'cdis000phaux447.cdis.cz'
wd_port2 = 9000
pgpool_port2 = 9999

delegate_ip = '10.31.28.60'

if_up_cmd = '/usr/bin/sudo /sbin/ip addr add $_IP_$/24 dev ens33 label ens33:0'
if_down_cmd = '/usr/bin/sudo /sbin/ip addr del $_IP_$/24 dev ens33'
arping_cmd = '/usr/bin/sudo /usr/sbin/arping -U $_IP_$ -w 1 -I ens33'

wd_escalation_command = '/etc/pgpool-II/escalation.sh'

wd_lifecheck_method = 'heartbeat'
wd_interval = 10

heartbeat_hostname0 = 'cdis000phaux445.cdis.cz'
heartbeat_port0 = 9694
heartbeat_hostname1 = 'cdis000phaux446.cdis.cz'
heartbeat_port1 = 9694
heartbeat_hostname2 = 'cdis000phaux447.cdis.cz'
heartbeat_port2 = 9694

wd_heartbeat_keepalive = 2
wd_heartbeat_deadtime = 30
num_init_children = 74


#SSL support for client authentication
ssl = on
ssl_cert = '/etc/pgpool-II/ssl/cdis000phaux444.cert.pem'
ssl_key = '/etc/pgpool-II/ssl/cdis000phaux444.key.pem'
