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