<div dir="ltr">Hi<div><br></div><div>I have found the problem and attached is the patch for the fix. </div><div>I will check-in the patch after executing the regression test. Meanwhile, you can also test it</div><div><br></div><div>Thanks</div><div>Best regards</div><div>Muhammad Usama</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 7, 2015 at 4:17 AM, Tatsuo Ishii <span dir="ltr"><<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have confirmed the problem is in 3.4.0 or later, not in 3.3.x or<br>
before.<br>
<br>
Usama,<br>
<br>
Can you please take care of this? It seems the problem was introduced<br>
in 3.4.0.<br>
<br>
protocol/child.c:<br>
<br>
                /* In non parallel mode single valid backend is all we need<br>
                 * to continue<br>
                 */<br>
                if(valid_backends == 0)<br>
                {<br>
                        fatal_error = true;<br>
                        error_msg = "pgpool is not accepting any new connections";<br>
                        error_detail = "all backend nodes are down, pgpool requires atleast one valid node";<br>
                        error_hint = "repair the backend nodes and restart pgpool";<br>
                }<br>
<br>
Also "atleast" seems a typo.<br>
<br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
<div><div class="h5"><br>
> I have pgpool 3.4.3 (from the pgdb93 repo) setup in raw mode pointing to a<br>
> single backend node on a separate server.  I would like set pgpool to<br>
> failover to the single node and attempt to reconnect indefinitely.  For<br>
> some reason I can't get the config right or it may be a bug?  I have it<br>
> working in a different environment using pgpool 3.2 from the epel repo<br>
><br>
> Any help would be greatly appreciated.<br>
><br>
><br>
> # Log<br>
><br>
> 2015-10-06 09:45:49: pid 13371: DETAIL:  postmaster on DB node 0 was<br>
> shutdown by administrative command<br>
> 2015-10-06 09:45:49: pid 13371: LOG:  received degenerate backend request<br>
> for node_id: 0 from pid [13371]<br>
> 2015-10-06 09:45:49: pid 13361: LOG:  starting degeneration. shutdown host<br>
> 172.16.0.59(5432)<br>
> 2015-10-06 09:45:49: pid 13361: LOG:  failover: no valid backends node found<br>
> 2015-10-06 09:45:49: pid 13361: LOG:  Restart all children<br>
> 2015-10-06 09:45:49: pid 13361: LOG:  failover: set new primary node: -1<br>
> 2015-10-06 09:45:49: pid 13374: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13370: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13376: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13367: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13363: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13373: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13372: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13365: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13364: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13377: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13366: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13375: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13368: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13369: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13371: LOG:  child process received shutdown<br>
> request signal 3<br>
> 2015-10-06 09:45:49: pid 13379: LOG:  worker process received restart<br>
> request<br>
> failover done. shutdown host 172.16.0.59(5432)2015-10-06 09:45:49: pid<br>
> 13361: LOG:  failover done. shutdown host 172.16.0.59(5432)<br>
> 2015-10-06 09:45:50: pid 13378: LOG:  restart request received in pcp child<br>
> process<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  PCP child 13378 exits with status 256<br>
> in failover()<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  fork a new PCP child pid 13399 in<br>
> failover()<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13363 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13363 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13364 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13364 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13365 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13365 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13366 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13366 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13367 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13367 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13368 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13368 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13369 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13369 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13370 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13370 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13371 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13371 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13372 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13372 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13373 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13373 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13374 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13374 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13375 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13375 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13376 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13376 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13377 exits<br>
> with status 0<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  child process with pid: 13377 exited<br>
> with success and will not be restarted<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  worker child process with pid: 13379<br>
> exits with status 256<br>
> 2015-10-06 09:45:50: pid 13361: LOG:  fork a new worker child process with<br>
> pid: 13400<br>
> 2015-10-06 09:46:02: pid 13392: FATAL:  pgpool is not accepting any new<br>
> connections<br>
> 2015-10-06 09:46:02: pid 13392: DETAIL:  all backend nodes are down, pgpool<br>
> requires atleast one valid node<br>
> 2015-10-06 09:46:02: pid 13392: HINT:  repair the backend nodes and restart<br>
> pgpool<br>
> 2015-10-06 09:46:02: pid 13361: LOG:  child process with pid: 13392 exits<br>
> with status 256<br>
> 2015-10-06 09:46:02: pid 13361: LOG:  fork a new child process with pid:<br>
> 13401<br>
> 2015-10-06 09:46:27: pid 13401: FATAL:  pgpool is not accepting any new<br>
> connections<br>
> 2015-10-06 09:46:27: pid 13401: DETAIL:  all backend nodes are down, pgpool<br>
> requires atleast one valid node<br>
> 2015-10-06 09:46:27: pid 13401: HINT:  repair the backend nodes and restart<br>
> pgpool<br>
> 2015-10-06 09:46:27: pid 13361: LOG:  child process with pid: 13401 exits<br>
> with status 256<br>
> 2015-10-06 09:46:27: pid 13361: LOG:  fork a new child process with pid:<br>
> 13410<br>
> 2015-10-06 09:46:34: pid 13390: FATAL:  pgpool is not accepting any new<br>
> connections<br>
> 2015-10-06 09:46:34: pid 13390: DETAIL:  all backend nodes are down, pgpool<br>
> requires atleast one valid node<br>
> 2015-10-06 09:46:34: pid 13390: HINT:  repair the backend nodes and restart<br>
> pgpool<br>
> 2015-10-06 09:46:34: pid 13361: LOG:  child process with pid: 13390 exits<br>
> with status 256<br>
> 2015-10-06 09:46:34: pid 13361: LOG:  fork a new child process with pid:<br>
> 13412<br>
><br>
><br>
><br>
><br>
><br>
> # Config File<br>
><br>
> #------------------------------------------------------------------------------<br>
> # CONNECTIONS<br>
> #------------------------------------------------------------------------------<br>
><br>
> # - pgpool Connection Settings -<br>
><br>
> listen_addresses = '*'<br>
>                                    # Host name or IP address to listen on:<br>
>                                    # '*' for all, '' for no TCP/IP<br>
> connections<br>
>                                    # (change requires restart)<br>
> port = 9999<br>
>                                    # Port number<br>
>                                    # (change requires restart)<br>
> socket_dir = '/var/run/pgpool-II-93'<br>
>                                    # Unix domain socket path<br>
>                                    # (change requires restart)<br>
><br>
><br>
> # - pgpool Communication Manager Connection Settings -<br>
><br>
> pcp_port = 9898<br>
>                                    # Port number for pcp<br>
>                                    # (change requires restart)<br>
> pcp_socket_dir = '/var/run/pgpool-II-93'<br>
>                                    # Unix domain socket path for pcp<br>
>                                    # (change requires restart)<br>
><br>
> # - Backend Connection Settings -<br>
><br>
> backend_hostname0 = '172.16.0.59'<br>
>                                    # Host name or IP address to connect to<br>
> for backend 0<br>
> backend_port0 = 5432<br>
>                                    # Port number for backend 0<br>
> # backend_weight0 = 1<br>
>                                    # Weight for backend 0 (only in load<br>
> balancing mode)<br>
> # backend_data_directory0 = '/var/lib/pgsql/9.3/data'<br>
>                                    # Data directory for backend 0<br>
> backend_flag0 = 'ALLOW_TO_FAILOVER'<br>
>                                    # Controls various backend behavior<br>
>                                    # ALLOW_TO_FAILOVER or<br>
> DISALLOW_TO_FAILOVER<br>
> #backend_hostname1 = 'host2'<br>
> #backend_port1 = 5433<br>
> #backend_weight1 = 1<br>
> #backend_data_directory1 = '/data1'<br>
> #backend_flag1 = 'ALLOW_TO_FAILOVER'<br>
><br>
> # - Authentication -<br>
><br>
> enable_pool_hba = off<br>
>                                    # Use pool_hba.conf for client<br>
> authentication<br>
> pool_passwd = 'pool_passwd'<br>
>                                    # File name of pool_passwd for md5<br>
> authentication.<br>
>                                    # "" disables pool_passwd.<br>
>                                    # (change requires restart)<br>
> authentication_timeout = 60<br>
>                                    # Delay in seconds to complete client<br>
> authentication<br>
>                                    # 0 means no timeout.<br>
><br>
> # - SSL Connections -<br>
><br>
> ssl = off<br>
>                                    # Enable SSL support<br>
>                                    # (change requires restart)<br>
> #ssl_key = './server.key'<br>
>                                    # Path to the SSL private key file<br>
>                                    # (change requires restart)<br>
> #ssl_cert = './server.cert'<br>
>                                    # Path to the SSL public certificate file<br>
>                                    # (change requires restart)<br>
> #ssl_ca_cert = ''<br>
>                                    # Path to a single PEM format file<br>
>                                    # containing CA root certificate(s)<br>
>                                    # (change requires restart)<br>
> #ssl_ca_cert_dir = ''<br>
>                                    # Directory containing CA root<br>
> certificate(s)<br>
>                                    # (change requires restart)<br>
><br>
><br>
> #------------------------------------------------------------------------------<br>
> # POOLS<br>
> #------------------------------------------------------------------------------<br>
><br>
> # - Pool size -<br>
><br>
> num_init_children = 15<br>
>                                    # Number of pools<br>
>                                   # (change requires restart)<br>
> max_pool = 1<br>
>                                    # Number of connections per pool<br>
>                                    # (change requires restart)<br>
><br>
> # - Life time -<br>
><br>
> child_life_time = 120 # was 300<br>
>                                    # Pool exits after being idle for this<br>
> many seconds<br>
> child_max_connections = 0<br>
>                                    # Pool exits after receiving that many<br>
> connections<br>
>                                    # 0 means no exit<br>
> connection_life_time = 0 # was 0<br>
>                                    # Connection to backend closes after<br>
> being idle for this many seconds<br>
>                                    # 0 means no close<br>
> client_idle_limit = 0 # was 0<br>
>                                    # Client is disconnected after being<br>
> idle for that many seconds<br>
>                                    # (even inside an explicit transactions!)<br>
>                                    # 0 means no disconnection<br>
><br>
><br>
> #------------------------------------------------------------------------------<br>
> # LOGS<br>
> #------------------------------------------------------------------------------<br>
><br>
> # - Where to log -<br>
><br>
> log_destination = 'stderr'<br>
>                                    # Where to log<br>
>                                    # Valid values are combinations of<br>
> stderr,<br>
>                                    # and syslog. Default to stderr.<br>
><br>
> # - What to log -<br>
><br>
> print_timestamp = on<br>
>                                    # Print timestamp on each line<br>
>                                    # (change requires restart)<br>
><br>
> log_connections = on<br>
>                                    # Log connections<br>
> log_hostname = off<br>
>                                    # Hostname will be shown in ps status<br>
>                                    # and in logs if connections are logged<br>
> log_statement = off<br>
>                                    # Log all statements<br>
> log_per_node_statement = off<br>
>                                    # Log all statements<br>
>                                    # with node and backend informations<br>
> log_standby_delay = 'none'<br>
>                                    # Log standby delay<br>
>                                    # Valid values are combinations of<br>
> always,<br>
>                                    # if_over_threshold, none<br>
><br>
> # - Syslog specific -<br>
><br>
> syslog_facility = 'LOCAL0'<br>
>                                    # Syslog local facility. Default to<br>
> LOCAL0<br>
> syslog_ident = 'pgpool'<br>
>                                    # Syslog program identification string<br>
>                                    # Default to 'pgpool'<br>
><br>
> # - Debug -<br>
><br>
> debug_level = 2<br>
>                                    # Debug message verbosity level<br>
>                                    # 0 means no message, 1 or more mean<br>
> verbose<br>
><br>
><br>
> #------------------------------------------------------------------------------<br>
> # FILE LOCATIONS<br>
> #------------------------------------------------------------------------------<br>
><br>
> pid_file_name = '/var/run/pgpool-II-93/pgpool.pid'<br>
>                                    # PID file name<br>
>                                    # (change requires restart)<br>
> logdir = '/var/log/pgpool-II'<br>
>                                    # Directory of pgPool status file<br>
>                                    # (change requires restart)<br>
><br>
><br>
> #------------------------------------------------------------------------------<br>
> # CONNECTION POOLING<br>
> #------------------------------------------------------------------------------<br>
><br>
> #connection_cache = off<br>
> connection_cache = on<br>
>                                    # Activate connection pools<br>
>                                    # (change requires restart)<br>
><br>
>                                    # Semicolon separated list of queries<br>
>                                    # to be issued at the end of a session<br>
>                                    # The default is for 8.3 and later<br>
> reset_query_list = 'ABORT; DISCARD ALL'<br>
>                                    # The following one is for 8.2 and before<br>
> #reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'<br>
><br>
><br>
> #------------------------------------------------------------------------------<br>
> # REPLICATION MODE<br>
> #------------------------------------------------------------------------------<br>
><br>
> replication_mode = off<br>
>                                    # Activate replication mode<br>
>                                    # (change requires restart)<br>
> replicate_select = off<br>
>                                    # Replicate SELECT statements<br>
>                                    # when in replication or parallel mode<br>
>                                    # replicate_select is higher priority<br>
> than<br>
>                                    # load_balance_mode.<br>
><br>
> insert_lock = on<br>
>                                    # Automatically locks a dummy row or a<br>
> table<br>
>                                    # with INSERT statements to keep SERIAL<br>
> data<br>
>                                    # consistency<br>
>                                    # Without SERIAL, no lock will be issued<br>
> lobj_lock_table = ''<br>
>                                    # When rewriting lo_creat command in<br>
>                                    # replication mode, specify table name to<br>
>                                    # lock<br>
><br>
> # - Degenerate handling -<br>
><br>
> replication_stop_on_mismatch = off<br>
>                                    # On disagreement with the packet kind<br>
>                                    # sent from backend, degenerate the node<br>
>                                    # which is most likely "minority"<br>
>                                    # If off, just force to exit this session<br>
><br>
> failover_if_affected_tuples_mismatch = off<br>
>                                    # On disagreement with the number of<br>
> affected<br>
>                                    # tuples in UPDATE/DELETE queries, then<br>
>                                    # degenerate the node which is most<br>
> likely<br>
>                                    # "minority".<br>
>                                    # If off, just abort the transaction to<br>
>                                    # keep the consistency<br>
><br>
><br>
> #------------------------------------------------------------------------------<br>
> # LOAD BALANCING MODE<br>
> #------------------------------------------------------------------------------<br>
><br>
> load_balance_mode = off<br>
>                                    # Activate load balancing mode<br>
>                                    # (change requires restart)<br>
> ignore_leading_white_space = on<br>
>                                    # Ignore leading white spaces of each<br>
> query<br>
> white_function_list = ''<br>
>                                    # Comma separated list of function names<br>
>                                    # that don't write to database<br>
>                                    # Regexp are accepted<br>
> black_function_list = 'nextval,setval'<br>
>                                    # Comma separated list of function names<br>
>                                    # that write to database<br>
>                                    # Regexp are accepted<br>
><br>
><br>
> #------------------------------------------------------------------------------<br>
> # MASTER/SLAVE MODE<br>
> #------------------------------------------------------------------------------<br>
><br>
> master_slave_mode = off<br>
>                                    # Activate master/slave mode<br>
>                                    # (change requires restart)<br>
> master_slave_sub_mode = 'slony'<br>
>                                    # Master/slave sub mode<br>
>                                    # Valid values are combinations slony or<br>
>                                    # stream. Default is slony.<br>
>                                    # (change requires restart)<br>
><br>
> # - Streaming -<br>
><br>
> sr_check_period = 0<br>
>                                    # Streaming replication check period<br>
>                                    # Disabled (0) by default<br>
> sr_check_user = 'webserver'<br>
>                                    # Streaming replication check user<br>
>                                    # This is necessary even if you disable<br>
>                                    # streaming replication delay check with<br>
>                                    # sr_check_period = 0<br>
> sr_check_password = ''<br>
>                                    # Password for streaming replication<br>
> check user<br>
> delay_threshold = 0<br>
>                                    # Threshold before not dispatching query<br>
> to standby node<br>
>                                    # Unit is in bytes<br>
>                                    # Disabled (0) by default<br>
><br>
> # - Special commands -<br>
><br>
> follow_master_command = ''<br>
>                                    # Executes this command after master<br>
> failover<br>
>                                    # Special values:<br>
>                                    #   %d = node id<br>
>                                    #   %h = host name<br>
>                                    #   %p = port number<br>
>                                    #   %D = database cluster path<br>
>                                    #   %m = new master node id<br>
>                                    #   %H = hostname of the new master node<br>
>                                    #   %M = old master node id<br>
>                                    #   %P = old primary node id<br>
>                                    #   %r = new master port number<br>
>                                    #   %R = new master database cluster path<br>
>                                    #   %% = '%' character<br>
><br>
><br>
> #------------------------------------------------------------------------------<br>
> # PARALLEL MODE<br>
> #------------------------------------------------------------------------------<br>
><br>
> parallel_mode = off<br>
>                                    # Activates parallel query mode<br>
>                                    # (change requires restart)<br>
> pgpool2_hostname = ''<br>
>                                    # Set pgpool2 hostname<br>
>                                    # (change requires restart)<br>
><br>
> # - System DB info -<br>
><br>
> system_db_hostname  = 'localhost'<br>
>                                    # (change requires restart)<br>
> system_db_port = 5432<br>
>                                    # (change requires restart)<br>
> system_db_dbname = 'pgpool'<br>
>                                    # (change requires restart)<br>
> system_db_schema = 'pgpool_catalog'<br>
>                                    # (change requires restart)<br>
> system_db_user = 'pgpool'<br>
>                                    # (change requires restart)<br>
> system_db_password = ''<br>
>                                    # (change requires restart)<br>
><br>
><br>
> #------------------------------------------------------------------------------<br>
> # HEALTH CHECK<br>
> #------------------------------------------------------------------------------<br>
><br>
> health_check_period = 10<br>
>                                    # Health check period<br>
>                                    # Disabled (0) by default<br>
> health_check_timeout = 10<br>
>                                    # Health check timeout<br>
>                                    # 0 means no timeout<br>
> health_check_user = 'webserver'<br>
>                                    # Health check user<br>
> health_check_password = ''<br>
>                                    # Password for health check user<br>
> health_check_max_retries = 30<br>
>                                    # Maximum number of times to retry a<br>
> failed health check before giving up.<br>
> health_check_retry_delay = 1<br>
>                                    # Amount of time to wait (in seconds)<br>
> between retries.<br>
><br>
><br>
> #------------------------------------------------------------------------------<br>
> # FAILOVER AND FAILBACK<br>
> #------------------------------------------------------------------------------<br>
><br>
> failover_command = ''<br>
>                                    # Executes this command at failover<br>
>                                    # Special values:<br>
>                                    #   %d = node id<br>
>                                    #   %h = host name<br>
>                                    #   %p = port number<br>
>                                    #   %D = database cluster path<br>
>                                    #   %m = new master node id<br>
>                                    #   %H = hostname of the new master node<br>
>                                    #   %M = old master node id<br>
>                                    #   %P = old primary node id<br>
>                                    #   %r = new master port number<br>
>                                    #   %R = new master database cluster path<br>
>                                    #   %% = '%' character<br>
> failback_command = ''<br>
>                                    # Executes this command at failback.<br>
>                                    # Special values:<br>
>                                    #   %d = node id<br>
>                                    #   %h = host name<br>
>                                    #   %p = port number<br>
>                                    #   %D = database cluster path<br>
>                                    #   %m = new master node id<br>
>                                    #   %H = hostname of the new master node<br>
>                                    #   %M = old master node id<br>
>                                    #   %P = old primary node id<br>
>                                    #   %r = new master port number<br>
>                                    #   %R = new master database cluster path<br>
>                                    #   %% = '%' character<br>
><br>
><br>
><br>
><br>
> fail_over_on_backend_error = on<br>
>                                    # Initiates failover when<br>
> reading/writing to the<br>
>                                    # backend communication socket fails<br>
>                                    # If set to off, pgpool will report an<br>
>                                    # error and disconnect the session.<br>
><br>
> search_primary_node_timeout = 0<br>
>                                    # Timeout in seconds to search for the<br>
>                                    # primary node when a failover occurs.<br>
>                                    # 0 means no timeout, keep searching<br>
>                                    # for a primary node forever.<br>
><br>
> #------------------------------------------------------------------------------<br>
> # ONLINE RECOVERY<br>
> #------------------------------------------------------------------------------<br>
><br>
> recovery_user = 'webserver'<br>
>                                    # Online recovery user<br>
> recovery_password = ''<br>
>                                    # Online recovery password<br>
> recovery_1st_stage_command = ''<br>
>                                    # Executes a command in first stage<br>
> recovery_2nd_stage_command = ''<br>
>                                    # Executes a command in second stage<br>
> recovery_timeout = 90<br>
>                                    # Timeout in seconds to wait for the<br>
>                                    # recovering node's postmaster to start<br>
> up<br>
>                                    # 0 means no wait<br>
> client_idle_limit_in_recovery = 0<br>
>                                    # Client is disconnected after being idle<br>
>                                    # for that many seconds in the second<br>
> stage<br>
>                                    # of online recovery<br>
>                                    # 0 means no disconnection<br>
>                                    # -1 means immediate disconnection<br>
><br>
><br>
> #------------------------------------------------------------------------------<br>
> # WATCHDOG<br>
> #------------------------------------------------------------------------------<br>
><br>
> # - Enabling -<br>
><br>
> use_watchdog = off<br>
>                                     # Activates watchdog<br>
>                                     # (change requires restart)<br>
><br>
> # -Connection to up stream servers -<br>
><br>
> trusted_servers = ''<br>
>                                     # trusted server list which are used<br>
>                                     # to confirm network connection<br>
>                                     # (hostA,hostB,hostC,...)<br>
>                                     # (change requires restart)<br>
> ping_path = '/bin'<br>
>                                     # ping command path<br>
>                                     # (change requires restart)<br>
><br>
> # - Watchdog communication Settings -<br>
><br>
> wd_hostname = ''<br>
>                                     # Host name or IP address of this<br>
> watchdog<br>
>                                     # (change requires restart)<br>
> wd_port = 9000<br>
>                                     # port number for watchdog service<br>
>                                     # (change requires restart)<br>
> wd_authkey = ''<br>
>                                     # Authentication key for watchdog<br>
> communication<br>
>                                     # (change requires restart)<br>
><br>
> # - Virtual IP control Setting -<br>
><br>
> delegate_IP = ''<br>
>                                     # delegate IP address<br>
>                                     # If this is empty, virtual IP never<br>
> bring up.<br>
>                                     # (change requires restart)<br>
> ifconfig_path = '/sbin'<br>
>                                     # ifconfig command path<br>
>                                     # (change requires restart)<br>
> if_up_cmd = 'ifconfig eth0:0 inet $_IP_$ netmask 255.255.255.0'<br>
>                                     # startup delegate IP command<br>
>                                     # (change requires restart)<br>
> if_down_cmd = 'ifconfig eth0:0 down'<br>
>                                     # shutdown delegate IP command<br>
>                                     # (change requires restart)<br>
><br>
> arping_path = '/usr/sbin'           # arping command path<br>
>                                     # (change requires restart)<br>
><br>
> arping_cmd = 'arping -U $_IP_$ -w 1'<br>
>                                     # arping command<br>
>                                     # (change requires restart)<br>
><br>
> # - Behaivor on escalation Setting -<br>
><br>
> clear_memqcache_on_escalation = on<br>
>                                     # Clear all the query cache on shared<br>
> memory<br>
>                                     # when standby pgpool escalate to<br>
> active pgpool<br>
>                                     # (= virtual IP holder).<br>
>                                     # This should be off if client connects<br>
> to pgpool<br>
>                                     # not using virtual IP.<br>
>                                     # (change requires restart)<br>
> wd_escalation_command = ''<br>
>                                     # Executes this command at escalation<br>
> on new active pgpool.<br>
>                                     # (change requires restart)<br>
><br>
> # - Lifecheck Setting -<br>
><br>
> # -- common --<br>
><br>
> wd_lifecheck_method = 'heartbeat'<br>
>                                     # Method of watchdog lifecheck<br>
> ('heartbeat' or 'query')<br>
>                                     # (change requires restart)<br>
> wd_interval = 10<br>
>                                     # lifecheck interval (sec) > 0<br>
>                                     # (change requires restart)<br>
><br>
> # -- heartbeat mode --<br>
><br>
> wd_heartbeat_port = 9694<br>
>                                     # Port number for receiving heartbeat<br>
> signal<br>
>                                     # (change requires restart)<br>
> wd_heartbeat_keepalive = 2<br>
>                                     # Interval time of sending heartbeat<br>
> signal (sec)<br>
>                                     # (change requires restart)<br>
> wd_heartbeat_deadtime = 30<br>
>                                     # Deadtime interval for heartbeat<br>
> signal (sec)<br>
>                                     # (change requires restart)<br>
> heartbeat_destination0 = 'host0_ip1'<br>
>                                     # Host name or IP address of<br>
> destination 0<br>
>                                     # for sending heartbeat signal.<br>
>                                     # (change requires restart)<br>
> heartbeat_destination_port0 = 9694<br>
>                                     # Port number of destination 0 for<br>
> sending<br>
>                                     # heartbeat signal. Usually this is the<br>
>                                     # same as wd_heartbeat_port.<br>
>                                     # (change requires restart)<br>
> heartbeat_device0 = ''<br>
>                                     # Name of NIC device (such like 'eth0')<br>
>                                     # used for sending/receiving heartbeat<br>
>                                     # signal to/from destination 0.<br>
>                                     # This works only when this is not empty<br>
>                                     # and pgpool has root privilege.<br>
>                                     # (change requires restart)<br>
><br>
> #heartbeat_destination1 = 'host0_ip2'<br>
> #heartbeat_destination_port1 = 9694<br>
> #heartbeat_device1 = ''<br>
><br>
> # -- query mode --<br>
><br>
> wd_life_point = 3<br>
>                                     # lifecheck retry times<br>
>                                     # (change requires restart)<br>
> wd_lifecheck_query = 'SELECT 1'<br>
>                                     # lifecheck query to pgpool from<br>
> watchdog<br>
>                                     # (change requires restart)<br>
> wd_lifecheck_dbname = 'template1'<br>
>                                     # Database name connected for lifecheck<br>
>                                     # (change requires restart)<br>
> wd_lifecheck_user = 'nobody'<br>
>                                     # watchdog user monitoring pgpools in<br>
> lifecheck<br>
>                                     # (change requires restart)<br>
> wd_lifecheck_password = ''<br>
>                                     # Password for watchdog user in<br>
> lifecheck<br>
>                                     # (change requires restart)<br>
><br>
> # - Other pgpool Connection Settings -<br>
><br>
> #other_pgpool_hostname0 = 'host0'<br>
>                                     # Host name or IP address to connect to<br>
> for other pgpool 0<br>
>                                     # (change requires restart)<br>
> #other_pgpool_port0 = 5432<br>
>                                     # Port number for othet pgpool 0<br>
>                                     # (change requires restart)<br>
> #other_wd_port0 = 9000<br>
>                                     # Port number for othet watchdog 0<br>
>                                     # (change requires restart)<br>
> #other_pgpool_hostname1 = 'host1'<br>
> #other_pgpool_port1 = 5432<br>
> #other_wd_port1 = 9000<br>
><br>
><br>
> #------------------------------------------------------------------------------<br>
> # OTHERS<br>
> #------------------------------------------------------------------------------<br>
> relcache_expire = 0<br>
>                                    # Life time of relation cache in seconds.<br>
>                                    # 0 means no cache expiration(the<br>
> default).<br>
>                                    # The relation cache is used for cache<br>
> the<br>
>                                    # query result against PostgreSQL system<br>
>                                    # catalog to obtain various information<br>
>                                    # including table structures or if it's a<br>
>                                    # temporary table or not. The cache is<br>
>                                    # maintained in a pgpool child local<br>
> memory<br>
>                                    # and being kept as long as it survives.<br>
>                                    # If someone modify the table by using<br>
>                                    # ALTER TABLE or some such, the relcache<br>
> is<br>
>                                    # not consistent anymore.<br>
>                                    # For this purpose, cache_expiration<br>
>                                    # controls the life time of the cache.<br>
><br>
> relcache_size = 256<br>
>                                    # Number of relation cache<br>
>                                    # entry. If you see frequently:<br>
>                                    # "pool_search_relcache: cache<br>
> replacement happend"<br>
>                                    # in the pgpool log, you might want to<br>
> increate this number.<br>
><br>
> check_temp_table = on<br>
>                                    # If on, enable temporary table check in<br>
> SELECT statements.<br>
>                                    # This initiates queries against system<br>
> catalog of primary/master<br>
>                                    # thus increases load of master.<br>
>                                    # If you are absolutely sure that your<br>
> system never uses temporary tables<br>
>                                    # and you want to save access to<br>
> primary/master, you could turn this off.<br>
>                                    # Default is on.<br>
><br>
><br>
> #------------------------------------------------------------------------------<br>
> # ON MEMORY QUERY MEMORY CACHE<br>
> #------------------------------------------------------------------------------<br>
> memory_cache_enabled = off<br>
>                                    # If on, use the memory cache<br>
> functionality, off by default<br>
> memqcache_method = 'shmem'<br>
>                                    # Cache storage method. either<br>
> 'shmem'(shared memory) or<br>
>                                    # 'memcached'. 'shmem' by default<br>
>                                    # (change requires restart)<br>
> memqcache_memcached_host = 'localhost'<br>
>                                    # Memcached host name or IP address.<br>
> Mandatory if<br>
>                                    # memqcache_method = 'memcached'.<br>
>                                    # Defaults to localhost.<br>
>                                    # (change requires restart)<br>
> memqcache_memcached_port = 11211<br>
>                                    # Memcached port number. Mondatory if<br>
> memqcache_method = 'memcached'.<br>
>                                    # Defaults to 11211.<br>
>                                    # (change requires restart)<br>
> memqcache_total_size = 67108864<br>
>                                    # Total memory size in bytes for storing<br>
> memory cache.<br>
>                                    # Mandatory if memqcache_method =<br>
> 'shmem'.<br>
>                                    # Defaults to 64MB.<br>
>                                    # (change requires restart)<br>
> memqcache_max_num_cache = 1000000<br>
>                                    # Total number of cache entries.<br>
> Mandatory<br>
>                                    # if memqcache_method = 'shmem'.<br>
>                                    # Each cache entry consumes 48 bytes on<br>
> shared memory.<br>
>                                    # Defaults to 1,000,000(45.8MB).<br>
>                                    # (change requires restart)<br>
> memqcache_expire = 0<br>
>                                    # Memory cache entry life time specified<br>
> in seconds.<br>
>                                    # 0 means infinite life time. 0 by<br>
> default.<br>
>                                    # (change requires restart)<br>
> memqcache_auto_cache_invalidation = on<br>
>                                    # If on, invalidation of query cache is<br>
> triggered by corresponding<br>
>                                    # DDL/DML/DCL(and memqcache_expire).  If<br>
> off, it is only triggered<br>
>                                    # by memqcache_expire.  on by default.<br>
>                                    # (change requires restart)<br>
> memqcache_maxcache = 409600<br>
>                                    # Maximum SELECT result size in bytes.<br>
>                                    # Must be smaller than<br>
> memqcache_cache_block_size. Defaults to 400KB.<br>
>                                    # (change requires restart)<br>
> memqcache_cache_block_size = 1048576<br>
>                                    # Cache block size in bytes. Mandatory<br>
> if memqcache_method = 'shmem'.<br>
>                                    # Defaults to 1MB.<br>
>                                    # (change requires restart)<br>
> memqcache_oiddir = '/var/log/pgpool/oiddir'<br>
>                                       # Temporary work directory to record<br>
> table oids<br>
>                                    # (change requires restart)<br>
> white_memqcache_table_list = ''<br>
>                                    # Comma separated list of table names to<br>
> memcache<br>
>                                    # that don't write to database<br>
>                                    # Regexp are accepted<br>
> black_memqcache_table_list = ''<br>
>                                    # Comma separated list of table names<br>
> not to memcache<br>
>                                    # that don't write to database<br>
>                                    # Regexp are accepted<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> --<br>
> [image: FBS Logo]<br>
><br>
</div></div>> *Travis Kirstine*, Web Development Supervisor<br>
> *t *905‑477‑3600* x *301 | *m *647‑534‑4798 |<br>
> <a href="mailto:tkirstine@firstbasesolution.com">tkirstine@firstbasesolution.com</a><br>
><br>
> *First Base Solutions Inc.*<br>
<span class="">> 140 Renfrew Drive, Suite 100 | Markham | Ontario | L3R 6B3<br>
</span>> *t* 905‑477‑3600 | *f* 905‑477‑0892 | <a href="http://www.firstbasesolutions.com" rel="noreferrer" target="_blank">www.firstbasesolutions.com</a><br>
_______________________________________________<br>
pgpool-general mailing list<br>
<a href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br>
</blockquote></div><br></div>