<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 28, 2017 at 5:47 AM, Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Usama,<br>
<br>
Unfortunately after applying your patches, pgpool won&#39;t start any<br>
more. Here&#39;s back trace info. pgpool.conf attached.<br></blockquote><div><br></div>I think you need to delete  <i>src/config/pool_config.c</i> and <i>src/tools/pgmd5/pool_config.c</i> autogenerated files before building the Pgpool-II, The reason being the memory for POOL_CONFIG-&gt;health_check_params is allocated in pgpool_config.l and apparently the make is not regenerating the pgpool_config.c.</div><div class="gmail_quote">I was also wondering that we could use the array for health_check_params in POOL_CONFIG rather than a pointer and allocating it dynamically.<br><br>Thanks<br>Best regards<br>Muhammad Usama<br></div><div class="gmail_quote"><br>  <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>t-ishii@localhost: gdb /home/t-ishii/work/pgpool-II/<wbr>current/bin/pgpool<br>
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1<br>
Copyright (C) 2016 Free Software Foundation, Inc.<br>
License GPLv3+: GNU GPL version 3 or later &lt;<a href="http://gnu.org/licenses/gpl.html" rel="noreferrer" target="_blank">http://gnu.org/licenses/gpl.<wbr>html</a>&gt;<br>
This is free software: you are free to change and redistribute it.<br>
There is NO WARRANTY, to the extent permitted by law.  Type &quot;show copying&quot;<br>
and &quot;show warranty&quot; for details.<br>
This GDB was configured as &quot;x86_64-linux-gnu&quot;.<br>
Type &quot;show configuration&quot; for configuration details.<br>
For bug reporting instructions, please see:<br>
&lt;<a href="http://www.gnu.org/software/gdb/bugs/" rel="noreferrer" target="_blank">http://www.gnu.org/software/<wbr>gdb/bugs/</a>&gt;.<br>
Find the GDB manual and other documentation resources online at:<br>
&lt;<a href="http://www.gnu.org/software/gdb/documentation/" rel="noreferrer" target="_blank">http://www.gnu.org/software/<wbr>gdb/documentation/</a>&gt;.<br>
For help, type &quot;help&quot;.<br>
Type &quot;apropos word&quot; to search for commands related to &quot;word&quot;...<br>
Reading symbols from /home/t-ishii/work/pgpool-II/<wbr>current/bin/pgpool...done.<br>
(gdb) run -D -n -f /home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/etc/pgpool.<wbr>conf -F /home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/etc/pcp.conf -a $dir/etc/pool_hba.conf<br>
Starting program: /home/t-ishii/work/pgpool-II/<wbr>current/bin/pgpool -D -n -f /home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/etc/pgpool.<wbr>conf -F /home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/etc/pcp.conf -a $dir/etc/pool_hba.conf<br>
[Thread debugging using libthread_db enabled]<br>
Using host libthread_db library &quot;/lib/x86_64-linux-gnu/<wbr>libthread_db.so.1&quot;.<br>
<br>
Program received signal SIGSEGV, Segmentation fault.<br>
0x0000000000411e22 in HealthCheckMaxRetriesAssignFun<wbr>c (context=CFGCXT_BOOT, newval=0, index=0, elevel=20)<br>
    at config/pool_config_variables.<wbr>c:3754<br>
3754            g_pool_config.health_check_<wbr>params[index].health_check_<wbr>max_retries = newval;<br>
(gdb) p g_pool_config.health_check_<wbr>params<br>
$1 = (HealthCheckParams *) 0x0<br>
(gdb)<br>
<br>
From: Muhammad Usama &lt;<a href="mailto:m.usama@gmail.com">m.usama@gmail.com</a>&gt;<br>
Subject: Re: [pgpool-hackers: 2213] RFC: New health check implementation<br>
Date: Thu, 27 Apr 2017 21:27:29 +0500<br>
Message-ID: &lt;CAEJvTzV-JtRLBzH1Z=<a href="mailto:Y3QJWx%2BxXSYKd_2R5Gmv%2BtnRkz%2B9_%2B8g@mail.gmail.com">Y3QJWx+<wbr>xXSYKd_2R5Gmv+tnRkz+9_+8g@<wbr>mail.gmail.com</a>&gt;<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
&gt; Hi Ishii-San<br>
&gt;<br>
&gt; Please find the attached WIP patch to allow the same name configuration<br>
&gt; parameters with and without index postfix along with the integration of<br>
&gt; all newly added health_check_* parameters.<br>
&gt;<br>
&gt;<br>
&gt; To implement the same name parameter with and without index postfix is<br>
&gt; that, The patch makes adds the following to the config framework.<br>
&gt;<br>
&gt; -- All the array type config (config_int_array, config_string_array<br>
&gt; ...) parameters<br>
&gt; can be configured to allow the setting of values with the same name but<br>
&gt; with out providing the index.<br>
&gt; -- This same named config parameter with and without index postfix must be<br>
&gt; of same data type.<br>
&gt; -- The indexed (array) parameters and the same name parameter without index<br>
&gt; postfix can be made independent and also the index free one can be<br>
&gt; entangled with array.<br>
&gt; -- The new DEFAULT_FOR_NO_VALUE_ARRAY_VAR flag enables the index free value<br>
&gt; of the array type record to serve as the default value for all indexes for<br>
&gt; which the value is not provided<br>
&gt; -- If the value for index free (same name parameter but without index<br>
&gt; postfix) is updated in the session and DEFAULT_FOR_NO_VALUE_ARRAY_VAR flag<br>
&gt; is set the value of all indexes which are not provided by user are also<br>
&gt; updated for the session.<br>
&gt;<br>
&gt; Note that it is still a WIP patch, Although the functionality is complete<br>
&gt; from my side but it needs little cleanup and also more testing, but I want<br>
&gt; to share the early version with you to make sure the patch follows the<br>
&gt; same philosophy as envisioned by you for the type of configuration<br>
&gt; parameter.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thanks<br>
&gt; Best regards<br>
&gt; Muhammad Usama<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Apr 26, 2017 at 5:32 AM, Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; &gt; On Tue, Apr 25, 2017 at 7:24 PM, Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; Hi Usama,<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt; Hi Ishii-San<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; I am working on config framework modification to allow same name<br>
&gt;&gt; &gt;&gt; parameters<br>
&gt;&gt; &gt;&gt; &gt; with and without index postfix, I am almost done with the framework<br>
&gt;&gt; &gt;&gt; related<br>
&gt;&gt; &gt;&gt; &gt; changes.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Thanks!<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt; And now for testing I need to add one such parameter and I was<br>
&gt;&gt; thinking<br>
&gt;&gt; &gt;&gt; &gt; instead of using a dummy configuration variable for testing I would<br>
&gt;&gt; &gt;&gt; rather<br>
&gt;&gt; &gt;&gt; &gt; add the *health_check_period* and *health_check_period[idx]* so that<br>
&gt;&gt; you<br>
&gt;&gt; &gt;&gt; &gt; can also use it.<br>
&gt;&gt; &gt;&gt; &gt; For that can you tell me where do you want to create<br>
&gt;&gt; health_check_period<br>
&gt;&gt; &gt;&gt; &gt; variable for each backend? Is BackendInfo structure is the right<br>
&gt;&gt; place?<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I&#39;m working on it for the part. I will push it tomorrow. BTW, unlike<br>
&gt;&gt; &gt;&gt; BackendInfo, the structure does not need to live on the shared memory.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Sure thanks, And yes you are right  the health_check_period doesn&#39;t needs<br>
&gt;&gt; &gt; to go in shared memory,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; You can just push the structure related changes for the<br>
&gt;&gt; health_check_period<br>
&gt;&gt; &gt; parameters and I will make it configurable, that way it will save you the<br>
&gt;&gt; &gt; time and also I will be able to test the changes before pushing the<br>
&gt;&gt; changes.<br>
&gt;&gt;<br>
&gt;&gt; Thanks. I have just pushed chages to add the data structure along with<br>
&gt;&gt; sample configuration files changes.<br>
&gt;&gt;<br>
&gt;&gt; <a href="https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=" rel="noreferrer" target="_blank">https://git.postgresql.org/<wbr>gitweb/?p=pgpool2.git;a=<wbr>commit;h=</a><br>
&gt;&gt; c0d209d76c67fe10690c33d0a982c0<wbr>fb3b919544<br>
&gt;&gt;<br>
&gt;&gt; Best regards,<br>
&gt;&gt; --<br>
&gt;&gt; Tatsuo Ishii<br>
&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt; Thanks<br>
&gt;&gt; &gt;&gt; &gt; Best Regards<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; On Mon, Apr 24, 2017 at 7:42 AM, Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt;<br>
&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; On 21-Apr-2017, at 4:31 AM, Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Usama,<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Is it possible to have following config parameter at the same<br>
&gt;&gt; time?<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; My feeling is we can&#39;t because current implementation of config<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; handling does not allow it.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; health_check_period = 10<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; health_check_period0 = 5<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Yes, having the same named configuration parameter with and without<br>
&gt;&gt; &gt;&gt; &gt;&gt; index postfix would cause problem with the current implementations,<br>
&gt;&gt; but<br>
&gt;&gt; &gt;&gt; if<br>
&gt;&gt; &gt;&gt; &gt;&gt; we want to support this I can tweak the configuration framework to<br>
&gt;&gt; allow<br>
&gt;&gt; &gt;&gt; &gt;&gt; that.<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; That would be desirable.<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; Best regards,<br>
&gt;&gt; &gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; &gt;&gt; Tatsuo Ishii<br>
&gt;&gt; &gt;&gt; &gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; &gt;&gt; &gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Thanks<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Best regards<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Muhammad Usama<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Best regards,<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Tatsuo Ishii<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; Hi,<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; This is a Request for Comments on the new implementation of<br>
&gt;&gt; health<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; check aiming for Pgpool-II 3.7.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; Problems:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; Current implementation of health check is a single serial<br>
&gt;&gt; processing<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; for all of database nodes. This implies some limitations for<br>
&gt;&gt; health<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; check process: 1) it is not possible to specify different health<br>
&gt;&gt; &gt;&gt; check<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; configuration values for each database node, 2) node failure<br>
&gt;&gt; &gt;&gt; detection<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; may take longer. For example, if it takes 10 seconds before<br>
&gt;&gt; &gt;&gt; detecting<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; node 0 failure, then detecting node 1 failure will be delayed at<br>
&gt;&gt; &gt;&gt; least<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; 10 seconds because it starts node failure detection after node 0.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; The solution:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; Allow to specify health check parameters for each node.<br>
&gt;&gt; Pgpool.conf<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; will look like:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; health_check_period0 = 10<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; health_check_timeout0 = 20<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; :<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; :<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; where &quot;0&quot; means database node 0 (similar concept as &quot;backend_*0<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; parameters).<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; To make admin&#39;s life easier, current parameters can be used as<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; well. Suppose there are 3 nodes, and we have:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; health_check_period = 10<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; health_check_period0 = 5<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; then health_check_period for node 1 and 2 will be 10, while<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; health_check_period for node 0 will be 5. So parameter names<br>
&gt;&gt; without<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; node id works as a &quot;global variable&quot;.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; The implementation:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; Create separate child process of pgpool main process and let do<br>
&gt;&gt; the<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; heal check job for each database node. Once the health check<br>
&gt;&gt; child<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; process detects node failure, it signals to main process and main<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; process will perform failover.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; This architecture makes pgpool main process simpler and robust,<br>
&gt;&gt; &gt;&gt; while<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; earlier detection of node failure by the health check child<br>
&gt;&gt; process.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; Comments and suggestions are welcome.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; Best regards,<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; --<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; Tatsuo Ishii<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; SRA OSS, Inc. Japan<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; ______________________________<wbr>_________________<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; pgpool-hackers mailing list<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; <a href="mailto:pgpool-hackers@pgpool.net">pgpool-hackers@pgpool.net</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;&gt; <a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/<wbr>listinfo/pgpool-hackers</a><br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt;<br>
</div></div><br># ----------------------------<br>
# pgPool-II configuration file<br>
# ----------------------------<br>
#<br>
# This file consists of lines of the form:<br>
#<br>
#   name = value<br>
#<br>
# Whitespace may be used.  Comments are introduced with &quot;#&quot; anywhere on a line.<br>
# The complete list of parameter names and allowed values can be found in the<br>
# pgPool-II documentation.<br>
#<br>
# This file is read on server startup and when the server receives a SIGHUP<br>
# signal.  If you edit the file on a running system, you have to SIGHUP the<br>
# server for the changes to take effect, or use &quot;pgpool reload&quot;.  Some<br>
# parameters, which are marked below, require a server shutdown and restart to<br>
# take effect.<br>
#<br>
<br>
<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
# CONNECTIONS<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
<br>
# - pgpool Connection Settings -<br>
<br>
listen_addresses = &#39;localhost&#39;<br>
                                   # Host name or IP address to listen on:<br>
                                   # &#39;*&#39; for all, &#39;&#39; for no TCP/IP connections<br>
                                   # (change requires restart)<br>
port = 9999<br>
                                   # Port number<br>
                                   # (change requires restart)<br>
socket_dir = &#39;/tmp&#39;<br>
                                   # Unix domain socket path<br>
                                   # The Debian package defaults to<br>
                                   # /var/run/postgresql<br>
                                   # (change requires restart)<br>
<br>
<br>
# - pgpool Communication Manager Connection Settings -<br>
<br>
pcp_listen_addresses = &#39;*&#39;<br>
                                   # Host name or IP address for pcp process to listen on:<br>
                                   # &#39;*&#39; for all, &#39;&#39; for no TCP/IP connections<br>
                                   # (change requires restart)<br>
pcp_port = 9898<br>
                                   # Port number for pcp<br>
                                   # (change requires restart)<br>
pcp_socket_dir = &#39;/tmp&#39;<br>
                                   # Unix domain socket path for pcp<br>
                                   # The Debian package defaults to<br>
                                   # /var/run/postgresql<br>
                                   # (change requires restart)<br>
listen_backlog_multiplier = 2<br>
                                   # Set the backlog parameter of listen(2) to<br>
                                                                   # num_init_children * listen_backlog_multiplier.<br>
                                   # (change requires restart)<br>
serialize_accept = off<br>
                                   # whether to serialize accept() call to avoid thundering herd problem<br>
                                   # (change requires restart)<br>
<br>
# - Backend Connection Settings -<br>
<br>
backend_hostname0 = &#39;host1&#39;<br>
                                   # Host name or IP address to connect to 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 balancing mode)<br>
backend_data_directory0 = &#39;/data&#39;<br>
                                   # Data directory for backend 0<br>
backend_flag0 = &#39;ALLOW_TO_FAILOVER&#39;<br>
                                   # Controls various backend behavior<br>
                                   # ALLOW_TO_FAILOVER or DISALLOW_TO_FAILOVER<br>
#backend_hostname1 = &#39;host2&#39;<br>
#backend_port1 = 5433<br>
#backend_weight1 = 1<br>
#backend_data_directory1 = &#39;/data1&#39;<br>
#backend_flag1 = &#39;ALLOW_TO_FAILOVER&#39;<br>
<br>
# - Authentication -<br>
<br>
enable_pool_hba = off<br>
                                   # Use pool_hba.conf for client authentication<br>
pool_passwd = &#39;pool_passwd&#39;<br>
                                   # File name of pool_passwd for md5 authentication.<br>
                                   # &quot;&quot; disables pool_passwd.<br>
                                   # (change requires restart)<br>
authentication_timeout = 60<br>
                                   # Delay in seconds to complete client 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 = &#39;./server.key&#39;<br>
                                   # Path to the SSL private key file<br>
                                   # (change requires restart)<br>
#ssl_cert = &#39;./server.cert&#39;<br>
                                   # Path to the SSL public certificate file<br>
                                   # (change requires restart)<br>
#ssl_ca_cert = &#39;&#39;<br>
                                   # Path to a single PEM format file<br>
                                   # containing CA root certificate(s)<br>
                                   # (change requires restart)<br>
#ssl_ca_cert_dir = &#39;&#39;<br>
                                   # Directory containing CA root certificate(s)<br>
                                   # (change requires restart)<br>
<br>
<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
# POOLS<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
<br>
# - Concurrent session and pool size -<br>
<br>
num_init_children = 32<br>
                                   # Number of concurrent sessions allowed<br>
                                   # (change requires restart)<br>
max_pool = 4<br>
                                   # Number of connection pool caches per connection<br>
                                   # (change requires restart)<br>
<br>
# - Life time -<br>
<br>
child_life_time = 300<br>
                                   # Pool exits after being idle for this many seconds<br>
child_max_connections = 0<br>
                                   # Pool exits after receiving that many connections<br>
                                   # 0 means no exit<br>
connection_life_time = 0<br>
                                   # Connection to backend closes after being idle for this many seconds<br>
                                   # 0 means no close<br>
client_idle_limit = 0<br>
                                   # Client is disconnected after being idle for that many seconds<br>
                                   # (even inside an explicit transactions!)<br>
                                   # 0 means no disconnection<br>
<br>
<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
# LOGS<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
<br>
# - Where to log -<br>
<br>
log_destination = &#39;stderr&#39;<br>
                                   # Where to log<br>
                                   # Valid values are combinations of stderr,<br>
                                   # and syslog. Default to stderr.<br>
<br>
# - What to log -<br>
<br>
log_line_prefix = &#39;%t: pid %p: &#39;   # printf-style string to output at beginning of each log line.<br>
<br>
log_connections = off<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 = &#39;if_over_threshold&#39;<br>
                                   # Log standby delay<br>
                                   # Valid values are combinations of always,<br>
                                   # if_over_threshold, none<br>
<br>
# - Syslog specific -<br>
<br>
syslog_facility = &#39;LOCAL0&#39;<br>
                                   # Syslog local facility. Default to LOCAL0<br>
syslog_ident = &#39;pgpool&#39;<br>
                                   # Syslog program identification string<br>
                                   # Default to &#39;pgpool&#39;<br>
<br>
# - Debug -<br>
<br>
debug_level = 0<br>
                                   # Debug message verbosity level<br>
                                   # 0 means no message, 1 or more mean verbose<br>
<br>
#log_error_verbosity = default          # terse, default, or verbose messages<br>
<br>
#client_min_messages = notice           # values in order of decreasing detail:<br>
                                        #   debug5<br>
                                        #   debug4<br>
                                        #   debug3<br>
                                        #   debug2<br>
                                        #   debug1<br>
                                        #   log<br>
                                        #   notice<br>
                                        #   warning<br>
                                        #   error<br>
<br>
#log_min_messages = warning             # values in order of decreasing detail:<br>
                                        #   debug5<br>
                                        #   debug4<br>
                                        #   debug3<br>
                                        #   debug2<br>
                                        #   debug1<br>
                                        #   info<br>
                                        #   notice<br>
                                        #   warning<br>
                                        #   error<br>
                                        #   log<br>
                                        #   fatal<br>
                                        #   panic<br>
<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
# FILE LOCATIONS<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
<br>
pid_file_name = &#39;/var/run/pgpool/pgpool.pid&#39;<br>
                                   # PID file name<br>
                                   # (change requires restart)<br>
logdir = &#39;/tmp&#39;<br>
                                   # Directory of pgPool status file<br>
                                   # (change requires restart)<br>
<br>
<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
# CONNECTION POOLING<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
<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 = &#39;ABORT; DISCARD ALL&#39;<br>
                                   # The following one is for 8.2 and before<br>
#reset_query_list = &#39;ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT&#39;<br>
<br>
<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
# REPLICATION MODE<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<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 mode<br>
                                   # replicate_select is higher priority than<br>
                                   # load_balance_mode.<br>
<br>
insert_lock = off<br>
                                   # Automatically locks a dummy row or a table<br>
                                   # with INSERT statements to keep SERIAL data<br>
                                   # consistency<br>
                                   # Without SERIAL, no lock will be issued<br>
lobj_lock_table = &#39;&#39;<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 &quot;minority&quot;<br>
                                   # If off, just force to exit this session<br>
<br>
failover_if_affected_tuples_<wbr>mismatch = off<br>
                                   # On disagreement with the number of affected<br>
                                   # tuples in UPDATE/DELETE queries, then<br>
                                   # degenerate the node which is most likely<br>
                                   # &quot;minority&quot;.<br>
                                   # If off, just abort the transaction to<br>
                                   # keep the consistency<br>
<br>
<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
# LOAD BALANCING MODE<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
<br>
load_balance_mode = on<br>
                                   # Activate load balancing mode<br>
                                   # (change requires restart)<br>
ignore_leading_white_space = on<br>
                                   # Ignore leading white spaces of each query<br>
white_function_list = &#39;&#39;<br>
                                   # Comma separated list of function names<br>
                                   # that don&#39;t write to database<br>
                                   # Regexp are accepted<br>
black_function_list = &#39;currval,lastval,nextval,<wbr>setval&#39;<br>
                                   # Comma separated list of function names<br>
                                   # that write to database<br>
                                   # Regexp are accepted<br>
<br>
database_redirect_preference_<wbr>list = &#39;&#39;<br>
                                                                   # comma separated list of pairs of database and node id.<br>
                                                                   # example: postgres:primary,mydb[0-4]:1,<wbr>mydb[5-9]:2&#39;<br>
                                                                   # valid for streaming replicaton mode only.<br>
<br>
app_name_redirect_preference_<wbr>list = &#39;&#39;<br>
                                                                   # comma separated list of pairs of app name and node id.<br>
                                                                   # example: &#39;psql:primary,myapp[0-4]:1,<wbr>myapp[5-9]:standby&#39;<br>
                                                                   # valid for streaming replicaton mode only.<br>
allow_sql_comments = off<br>
                                                                   # if on, ignore SQL comments when judging if load balance or<br>
                                                                   # query cache is possible.<br>
                                                                   # If off, SQL comments effectively prevent the judgment<br>
                                                                   # (pre 3.4 behavior).<br>
<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
# MASTER/SLAVE MODE<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
<br>
master_slave_mode = on<br>
                                   # Activate master/slave mode<br>
                                   # (change requires restart)<br>
master_slave_sub_mode = &#39;stream&#39;<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 = 10<br>
                                   # Streaming replication check period<br>
                                   # Disabled (0) by default<br>
sr_check_user = &#39;nobody&#39;<br>
                                   # Streaming replication check user<br>
                                   # This is neccessary even if you disable streaming<br>
                                   # replication delay check by sr_check_period = 0<br>
sr_check_password = &#39;&#39;<br>
                                   # Password for streaming replication check user<br>
sr_check_database = &#39;postgres&#39;<br>
                                   # Database name for streaming replication check<br>
delay_threshold = 10000000<br>
                                   # Threshold before not dispatching query to standby node<br>
                                   # Unit is in bytes<br>
                                   # Disabled (0) by default<br>
<br>
# - Special commands -<br>
<br>
follow_master_command = &#39;&#39;<br>
                                   # Executes this command after master 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>
                                   #   %% = &#39;%&#39; character<br>
<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
# HEALTH CHECK<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
<br>
health_check_period = 0<br>
                                   # Health check period<br>
                                   # Disabled (0) by default<br>
health_check_timeout = 20<br>
                                   # Health check timeout<br>
                                   # 0 means no timeout<br>
health_check_user = &#39;nobody&#39;<br>
                                   # Health check user<br>
health_check_password = &#39;&#39;<br>
                                   # Password for health check user<br>
health_check_database = &#39;&#39;<br>
                                   # Database name for health check. If &#39;&#39;, tries &#39;postgres&#39; frist,<br>
health_check_max_retries = 0<br>
                                   # Maximum number of times to retry a failed health check before giving up.<br>
health_check_retry_delay = 1<br>
                                   # Amount of time to wait (in seconds) between retries.<br>
connect_timeout = 10000<br>
                                   # Timeout value in milliseconds before giving up to connect to backend.<br>
                                                                   # Default is 10000 ms (10 second). Flaky network user may want to increase<br>
                                                                   # the value. 0 means no timeout.<br>
                                                                   # Note that this value is not only used for health check,<br>
                                                                   # but also for ordinary conection to backend.<br>
<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
# FAILOVER AND FAILBACK<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
<br>
failover_command = &#39;&#39;<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>
                                   #   %% = &#39;%&#39; character<br>
failback_command = &#39;&#39;<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>
                                   #   %% = &#39;%&#39; character<br>
<br>
fail_over_on_backend_error = on<br>
                                   # Initiates failover when 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 = 300<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>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
# ONLINE RECOVERY<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
<br>
recovery_user = &#39;nobody&#39;<br>
                                   # Online recovery user<br>
recovery_password = &#39;&#39;<br>
                                   # Online recovery password<br>
recovery_1st_stage_command = &#39;&#39;<br>
                                   # Executes a command in first stage<br>
recovery_2nd_stage_command = &#39;&#39;<br>
                                   # Executes a command in second stage<br>
recovery_timeout = 90<br>
                                   # Timeout in seconds to wait for the<br>
                                   # recovering node&#39;s postmaster to start 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 stage<br>
                                   # of online recovery<br>
                                   # 0 means no disconnection<br>
                                   # -1 means immediate disconnection<br>
<br>
<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
# WATCHDOG<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<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 = &#39;&#39;<br>
                                    # trusted server list which are used<br>
                                    # to confirm network connection<br>
                                    # (hostA,hostB,hostC,...)<br>
                                    # (change requires restart)<br>
ping_path = &#39;/bin&#39;<br>
                                    # ping command path<br>
                                    # (change requires restart)<br>
<br>
# - Watchdog communication Settings -<br>
<br>
wd_hostname = &#39;&#39;<br>
                                    # Host name or IP address of this watchdog<br>
                                    # (change requires restart)<br>
wd_port = 9000<br>
                                    # port number for watchdog service<br>
                                    # (change requires restart)<br>
wd_priority = 1<br>
                                                                        # priority of this watchdog in leader election<br>
                                                                        # (change requires restart)<br>
<br>
wd_authkey = &#39;&#39;<br>
                                    # Authentication key for watchdog communication<br>
                                    # (change requires restart)<br>
<br>
wd_ipc_socket_dir = &#39;/tmp&#39;<br>
                                                                        # Unix domain socket path for watchdog IPC socket<br>
                                                                        # The Debian package defaults to<br>
                                                                        # /var/run/postgresql<br>
                                                                        # (change requires restart)<br>
<br>
<br>
# - Virtual IP control Setting -<br>
<br>
delegate_IP = &#39;&#39;<br>
                                    # delegate IP address<br>
                                    # If this is empty, virtual IP never bring up.<br>
                                    # (change requires restart)<br>
if_cmd_path = &#39;/sbin&#39;<br>
                                    # path to the directory where if_up/down_cmd exists<br>
                                    # (change requires restart)<br>
if_up_cmd = &#39;ip addr add $_IP_$/24 dev eth0 label eth0:0&#39;<br>
                                    # startup delegate IP command<br>
                                    # (change requires restart)<br>
if_down_cmd = &#39;ip addr del $_IP_$/24 dev eth0&#39;<br>
                                    # shutdown delegate IP command<br>
                                    # (change requires restart)<br>
arping_path = &#39;/usr/sbin&#39;<br>
                                    # arping command path<br>
                                    # (change requires restart)<br>
arping_cmd = &#39;arping -U $_IP_$ -w 1&#39;<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 memory<br>
                                    # when standby pgpool escalate to active pgpool<br>
                                    # (= virtual IP holder).<br>
                                    # This should be off if client connects to pgpool<br>
                                    # not using virtual IP.<br>
                                    # (change requires restart)<br>
wd_escalation_command = &#39;&#39;<br>
                                    # Executes this command at escalation on new active pgpool.<br>
                                    # (change requires restart)<br>
wd_de_escalation_command = &#39;&#39;<br>
                                                                        # Executes this command when master pgpool resigns from being master.<br>
                                                                        # (change requires restart)<br>
<br>
# - Lifecheck Setting -<br>
<br>
# -- common --<br>
<br>
wd_monitoring_interfaces_list = &#39;&#39;  # Comma separated list of interfaces names to monitor.<br>
                                                                        # if any interface from the list is active the watchdog will<br>
                                                                        # consider the network is fine<br>
                                                                        # &#39;any&#39; to enable monitoring on all interfaces except loopback<br>
                                                                        # &#39;&#39; to disable monitoring<br>
<br>
wd_lifecheck_method = &#39;heartbeat&#39;<br>
                                    # Method of watchdog lifecheck (&#39;heartbeat&#39; or &#39;query&#39; or &#39;external&#39;)<br>
                                    # (change requires restart)<br>
wd_interval = 10<br>
                                    # lifecheck interval (sec) &gt; 0<br>
                                    # (change requires restart)<br>
<br>
# -- heartbeat mode --<br>
<br>
wd_heartbeat_port = 9694<br>
                                    # Port number for receiving heartbeat signal<br>
                                    # (change requires restart)<br>
wd_heartbeat_keepalive = 2<br>
                                    # Interval time of sending heartbeat signal (sec)<br>
                                    # (change requires restart)<br>
wd_heartbeat_deadtime = 30<br>
                                    # Deadtime interval for heartbeat signal (sec)<br>
                                    # (change requires restart)<br>
heartbeat_destination0 = &#39;host0_ip1&#39;<br>
                                    # Host name or IP address of destination 0<br>
                                    # for sending heartbeat signal.<br>
                                    # (change requires restart)<br>
heartbeat_destination_port0 = 9694<br>
                                    # Port number of destination 0 for sending<br>
                                    # heartbeat signal. Usually this is the<br>
                                    # same as wd_heartbeat_port.<br>
                                    # (change requires restart)<br>
heartbeat_device0 = &#39;&#39;<br>
                                    # Name of NIC device (such like &#39;eth0&#39;)<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 = &#39;host0_ip2&#39;<br>
#heartbeat_destination_port1 = 9694<br>
#heartbeat_device1 = &#39;&#39;<br>
<br>
# -- query mode --<br>
<br>
wd_life_point = 3<br>
                                    # lifecheck retry times<br>
                                    # (change requires restart)<br>
wd_lifecheck_query = &#39;SELECT 1&#39;<br>
                                    # lifecheck query to pgpool from watchdog<br>
                                    # (change requires restart)<br>
wd_lifecheck_dbname = &#39;template1&#39;<br>
                                    # Database name connected for lifecheck<br>
                                    # (change requires restart)<br>
wd_lifecheck_user = &#39;nobody&#39;<br>
                                    # watchdog user monitoring pgpools in lifecheck<br>
                                    # (change requires restart)<br>
wd_lifecheck_password = &#39;&#39;<br>
                                    # Password for watchdog user in lifecheck<br>
                                    # (change requires restart)<br>
<br>
# - Other pgpool Connection Settings -<br>
<br>
#other_pgpool_hostname0 = &#39;host0&#39;<br>
                                    # Host name or IP address to connect to 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 = &#39;host1&#39;<br>
#other_pgpool_port1 = 5432<br>
#other_wd_port1 = 9000<br>
<br>
<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
# OTHERS<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
relcache_expire = 0<br>
                                   # Life time of relation cache in seconds.<br>
                                   # 0 means no cache expiration(the default).<br>
                                   # The relation cache is used for cache the<br>
                                   # query result against PostgreSQL system<br>
                                   # catalog to obtain various information<br>
                                   # including table structures or if it&#39;s a<br>
                                   # temporary table or not. The cache is<br>
                                   # maintained in a pgpool child local 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 is<br>
                                   # not consistent anymore.<br>
                                   # For this purpose, cache_expiration<br>
                                   # controls the life time of the cache.<br>
relcache_size = 256<br>
                                   # Number of relation cache<br>
                                   # entry. If you see frequently:<br>
                                                                   # &quot;pool_search_relcache: cache replacement happend&quot;<br>
                                                                   # in the pgpool log, you might want to increate this number.<br>
<br>
check_temp_table = on<br>
                                   # If on, enable temporary table check in SELECT statements.<br>
                                   # This initiates queries against system catalog of primary/master<br>
                                                                   # thus increases load of master.<br>
                                                                   # If you are absolutely sure that your system never uses temporary tables<br>
                                                                   # and you want to save access to primary/master, you could turn this off.<br>
                                                                   # Default is on.<br>
<br>
check_unlogged_table = on<br>
                                   # If on, enable unlogged table check in SELECT statements.<br>
                                   # This initiates queries against system catalog of primary/master<br>
                                   # thus increases load of master.<br>
                                   # If you are absolutely sure that your system never uses unlogged tables<br>
                                   # and you want to save access to primary/master, you could turn this off.<br>
                                   # Default is on.<br>
<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
# IN MEMORY QUERY MEMORY CACHE<br>
#-----------------------------<wbr>------------------------------<wbr>-------------------<br>
memory_cache_enabled = off<br>
                                                                   # If on, use the memory cache functionality, off by default<br>
memqcache_method = &#39;shmem&#39;<br>
                                                                   # Cache storage method. either &#39;shmem&#39;(shared memory) or<br>
                                                                   # &#39;memcached&#39;. &#39;shmem&#39; by default<br>
                                   # (change requires restart)<br>
memqcache_memcached_host = &#39;localhost&#39;<br>
                                                                   # Memcached host name or IP address. Mandatory if<br>
                                                                   # memqcache_method = &#39;memcached&#39;.<br>
                                                                   # Defaults to localhost.<br>
                                   # (change requires restart)<br>
memqcache_memcached_port = 11211<br>
                                                                   # Memcached port number. Mondatory if memqcache_method = &#39;memcached&#39;.<br>
                                                                   # Defaults to 11211.<br>
                                   # (change requires restart)<br>
memqcache_total_size = 67108864<br>
                                                                   # Total memory size in bytes for storing memory cache.<br>
                                                                   # Mandatory if memqcache_method = &#39;shmem&#39;.<br>
                                                                   # Defaults to 64MB.<br>
                                   # (change requires restart)<br>
memqcache_max_num_cache = 1000000<br>
                                                                   # Total number of cache entries. Mandatory<br>
                                                                   # if memqcache_method = &#39;shmem&#39;.<br>
                                                                   # Each cache entry consumes 48 bytes on 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 in seconds.<br>
                                                                   # 0 means infinite life time. 0 by default.<br>
                                   # (change requires restart)<br>
memqcache_auto_cache_<wbr>invalidation = on<br>
                                                                   # If on, invalidation of query cache is triggered by corresponding<br>
                                                                   # DDL/DML/DCL(and memqcache_expire).  If 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 memqcache_cache_block_size. Defaults to 400KB.<br>
                                   # (change requires restart)<br>
memqcache_cache_block_size = 1048576<br>
                                                                   # Cache block size in bytes. Mandatory if memqcache_method = &#39;shmem&#39;.<br>
                                                                   # Defaults to 1MB.<br>
                                   # (change requires restart)<br>
memqcache_oiddir = &#39;/var/log/pgpool/oiddir&#39;<br>
                                                                   # Temporary work directory to record table oids<br>
                                   # (change requires restart)<br>
white_memqcache_table_list = &#39;&#39;<br>
                                   # Comma separated list of table names to memcache<br>
                                   # that don&#39;t write to database<br>
                                   # Regexp are accepted<br>
black_memqcache_table_list = &#39;&#39;<br>
                                   # Comma separated list of table names not to memcache<br>
                                   # that don&#39;t write to database<br>
                                   # Regexp are accepted<br>
sr_check_user = &#39;t-ishii&#39;<br>
recovery_user = &#39;t-ishii&#39;<br>
recovery_password = &#39;&#39;<br>
recovery_1st_stage_command = &#39;basebackup.sh&#39;<br>
health_check_period = 10<br>
health_check_user = &#39;t-ishii&#39;<br>
memqcache_oiddir = &#39;/home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/log/pgpool/<wbr>oiddir&#39;<br>
log_per_node_statement = on<br>
failover_command = &#39;/home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/etc/failover.<wbr>sh %d %h %p %D %m %M %H %P %r %R&#39;<br>
socket_dir = &#39;/tmp&#39;<br>
pcp_socket_dir = &#39;/tmp&#39;<br>
port = 11000<br>
pcp_port = 11001<br>
pid_file_name = &#39;/home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/run/pgpool.<wbr>pid&#39;<br>
logdir = &#39;/home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/log&#39;<br>
backend_hostname0 = &#39;/tmp&#39;<br>
backend_port0 = 11002<br>
backend_weight0 = 1<br>
backend_data_directory0 = &#39;/home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/data0&#39;<br>
#backend_hostname1 = &#39;/tmp&#39;<br>
backend_hostname1 = &#39;133.137.175.105&#39;<br>
backend_port1 = 11003<br>
backend_weight1 = 1<br>
backend_data_directory1 = &#39;/home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/data1&#39;<br>
follow_master_command = &#39;/home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/etc/follow_<wbr>master.sh %d %h %p %D %m %M %H %P %r %R&#39;<br>
memory_cache_enabled = on<br>
memqcache_method = &#39;memcached&#39;<br>
health_check_max_retries = 3<br>
health_check_retry_delay = 1<br>
health_check_timeout = 5<br>
sr_check_period = 0<br>
log_error_verbosity = verbose<br>
health_check_period = 0<br>
health_check_max_retries1 = 1<br>
<br></blockquote></div><br></div></div>