#### #### IMPORTANT! #### This file is managed by Salt, if you mofify it your changes will be lost on salt-call. #### # Ports listen_addresses = '*' port = 5432 pcp_listen_addresses = '127.0.0.1' pcp_port = 9898 enable_pool_hba = on authentication_timeout = 10 pid_file_name = '/var/run/pgpool-II-96/pgpool.pid' socket_dir = '/tmp' pcp_socket_dir = '/tmp' # - SSL Connections - ssl = on # Enable SSL support # (change requires restart) ssl_key = '/etc/pgpool-II-96/ssl/key' # Path to the SSL private key file # (change requires restart) ssl_cert = '/etc/pgpool-II-96/ssl/crt' # Path to the SSL public certificate file # (change requires restart) #ssl_ca_cert = '' # Path to a single PEM format file # containing CA root certificate(s) # (change requires restart) #ssl_ca_cert_dir = '' # Directory containing CA root certificate(s) # (change requires restart) # # # sysctl net.core.somaxconn # net.core.somaxconn = 128 # # Formula for these options: # max_pool*num_init_children <= (max_connections - superuser_reserved_connections) (no query canceling needed) # max_pool*num_init_children*2 <= (max_connections - superuser_reserved_connections) (query canceling needed) # # DOC LINK: http://www.pgpool.net/docs/latest/pgpool-en.html num_init_children = 200 # TODO (choose appropriate one later!) max_pool = 1 # TODO (choose appropriate one later!) #child_life_time = 120 #client_idle_limit = 120 # Logs debug_level = 5 logdir = '/u01/log/pgpool' log_destination = 'stderr' #log_line_prefix = '...' # TODO #log_connections = on #log_statement = on #log_per_node_statement = on log_standby_delay = 'if_over_threshold' # Timeouts connect_timeout = 500 # 0.5 sec # Registered members backend_hostname0 = 'pgsql0.domain' backend_port0 = 5432 backend_weight0 = 1 backend_data_directory0 = '/u01/data/9.6' backend_flag0 = 'ALLOW_TO_FAILOVER' backend_hostname1 = 'pgsql1.domain' backend_port1 = 5432 backend_weight1 = 1 backend_data_directory1 = '/u01/data/9.6' backend_flag1 = 'ALLOW_TO_FAILOVER' backend_hostname2 = 'pgsql2.domain' backend_port2 = 5432 backend_weight2 = 1 backend_data_directory2 = '/u01/data/9.6' backend_flag2 = 'ALLOW_TO_FAILOVER' backend_hostname3 = 'pgsql3.domain' backend_port3 = 5432 backend_weight3 = 1 backend_data_directory3 = '/u01/data/9.6' backend_flag3 = 'ALLOW_TO_FAILOVER' # Replication settings master_slave_mode = on master_slave_sub_mode = stream sr_check_period = 1 sr_check_user = 'postgres' sr_check_password = '' # TODO: Needs to be adjusted before official launch! delay_threshold = 1024 # 1Kbyte load_balance_mode = on replicate_select = off ignore_leading_white_space = on # Health Check health_check_timeout = 10 health_check_period = 20 health_check_user = 'postgres' health_check_max_retries = 1 # Failover and failback fail_over_on_backend_error = off #------------------------------------------------------------------------------ # WATCHDOG #------------------------------------------------------------------------------ # - Enabling - use_watchdog = on # Activates watchdog # (change requires restart) # -Connection to up stream servers - trusted_servers = '' # trusted server list which are used # to confirm network connection # (hostA,hostB,hostC,...) # (change requires restart) ping_path = '/bin' # ping command path # (change requires restart) # - Watchdog communication Settings - wd_hostname = 'pgpool1.domain' # Host name or IP address of this watchdog # (change requires restart) wd_port = 9000 # port number for watchdog service # (change requires restart) wd_authkey = '' # Authentication key for watchdog communication # (change requires restart) # - Virtual IP control Setting - delegate_IP = '10.8.27.6' # delegate IP address # If this is empty, virtual IP never bring up. # (change requires restart) ifconfig_path = '/sbin' # ifconfig command path # (change requires restart) if_up_cmd = 'sudo ifconfig bond0:1 10.8.27.6 netmask 255.255.255.0 up' # startup delegate IP command # (change requires restart) if_down_cmd = 'sudo ifconfig bond0:1 down' # shutdown delegate IP command # (change requires restart) arping_path = '/sbin' # arping command path # (change requires restart) arping_cmd = 'sudo arping -A -Ibond0 10.8.27.6 -c3' # arping command # (change requires restart) # - Behaivor on escalation Setting - clear_memqcache_on_escalation = on # Clear all the query cache on shared memory # when standby pgpool escalate to active pgpool # (= virtual IP holder). # This should be off if client connects to pgpool # not using virtual IP. # (change requires restart) wd_escalation_command = '' # Executes this command at escalation on new active pgpool. # (change requires restart) # - Lifecheck Setting - # -- common -- wd_lifecheck_method = 'heartbeat' # Method of watchdog lifecheck ('heartbeat' or 'query') # (change requires restart) wd_interval = 10 # lifecheck interval (sec) > 0 # (change requires restart) # -- heartbeat mode -- wd_heartbeat_port = 9694 # Port number for receiving heartbeat signal # (change requires restart) wd_heartbeat_keepalive = 2 # Interval time of sending heartbeat signal (sec) # (change requires restart) wd_heartbeat_deadtime = 30 # Deadtime interval for heartbeat signal (sec) # (change requires restart) heartbeat_destination0 = 'pgpool2.domain' # Host name or IP address of destination 0 # for sending heartbeat signal. # (change requires restart) heartbeat_destination_port0 = 9694 # Port number of destination 0 for sending # heartbeat signal. Usually this is the # same as wd_heartbeat_port. # (change requires restart) heartbeat_device0 = '' # Name of NIC device (such like 'eth0') # used for sending/receiving heartbeat # signal to/from destination 0. # This works only when this is not empty # and pgpool has root privilege. # (change requires restart) #heartbeat_destination1 = 'host0_ip2' #heartbeat_destination_port1 = 9694 #heartbeat_device1 = '' # -- query mode -- wd_life_point = 3 # lifecheck retry times # (change requires restart) wd_lifecheck_query = 'SELECT 1' # lifecheck query to pgpool from watchdog # (change requires restart) wd_lifecheck_dbname = 'template1' # Database name connected for lifecheck # (change requires restart) wd_lifecheck_user = 'nobody' # watchdog user monitoring pgpools in lifecheck # (change requires restart) wd_lifecheck_password = '' # Password for watchdog user in lifecheck # (change requires restart) # - Other pgpool Connection Settings - other_pgpool_hostname0 = 'pgpool2.domain' # Host name or IP address to connect to for other pgpool 0 # (change requires restart) other_pgpool_port0 = 5432 # Port number for othet pgpool 0 # (change requires restart) other_wd_port0 = 9000 # Port number for othet watchdog 0 # (change requires restart) ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~