<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"><<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>></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't start any<br>
more. Here'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->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 <<a href="http://gnu.org/licenses/gpl.html" rel="noreferrer" target="_blank">http://gnu.org/licenses/gpl.<wbr>html</a>><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 "show copying"<br>
and "show warranty" for details.<br>
This GDB was configured as "x86_64-linux-gnu".<br>
Type "show configuration" for configuration details.<br>
For bug reporting instructions, please see:<br>
<<a href="http://www.gnu.org/software/gdb/bugs/" rel="noreferrer" target="_blank">http://www.gnu.org/software/<wbr>gdb/bugs/</a>>.<br>
Find the GDB manual and other documentation resources online at:<br>
<<a href="http://www.gnu.org/software/gdb/documentation/" rel="noreferrer" target="_blank">http://www.gnu.org/software/<wbr>gdb/documentation/</a>>.<br>
For help, type "help".<br>
Type "apropos word" to search for commands related to "word"...<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 "/lib/x86_64-linux-gnu/<wbr>libthread_db.so.1".<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 <<a href="mailto:m.usama@gmail.com">m.usama@gmail.com</a>><br>
Subject: Re: [pgpool-hackers: 2213] RFC: New health check implementation<br>
Date: Thu, 27 Apr 2017 21:27:29 +0500<br>
Message-ID: <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>><br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
> Hi Ishii-San<br>
><br>
> Please find the attached WIP patch to allow the same name configuration<br>
> parameters with and without index postfix along with the integration of<br>
> all newly added health_check_* parameters.<br>
><br>
><br>
> To implement the same name parameter with and without index postfix is<br>
> that, The patch makes adds the following to the config framework.<br>
><br>
> -- All the array type config (config_int_array, config_string_array<br>
> ...) parameters<br>
> can be configured to allow the setting of values with the same name but<br>
> with out providing the index.<br>
> -- This same named config parameter with and without index postfix must be<br>
> of same data type.<br>
> -- The indexed (array) parameters and the same name parameter without index<br>
> postfix can be made independent and also the index free one can be<br>
> entangled with array.<br>
> -- The new DEFAULT_FOR_NO_VALUE_ARRAY_VAR flag enables the index free value<br>
> of the array type record to serve as the default value for all indexes for<br>
> which the value is not provided<br>
> -- If the value for index free (same name parameter but without index<br>
> postfix) is updated in the session and DEFAULT_FOR_NO_VALUE_ARRAY_VAR flag<br>
> is set the value of all indexes which are not provided by user are also<br>
> updated for the session.<br>
><br>
> Note that it is still a WIP patch, Although the functionality is complete<br>
> from my side but it needs little cleanup and also more testing, but I want<br>
> to share the early version with you to make sure the patch follows the<br>
> same philosophy as envisioned by you for the type of configuration<br>
> parameter.<br>
><br>
><br>
><br>
> Thanks<br>
> Best regards<br>
> Muhammad Usama<br>
><br>
><br>
> On Wed, Apr 26, 2017 at 5:32 AM, Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>> wrote:<br>
><br>
>> > On Tue, Apr 25, 2017 at 7:24 PM, Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>><br>
>> wrote:<br>
>> ><br>
>> >> Hi Usama,<br>
>> >><br>
>> >> > Hi Ishii-San<br>
>> >> ><br>
>> >> > I am working on config framework modification to allow same name<br>
>> >> parameters<br>
>> >> > with and without index postfix, I am almost done with the framework<br>
>> >> related<br>
>> >> > changes.<br>
>> >><br>
>> >> Thanks!<br>
>> >><br>
>> >> > And now for testing I need to add one such parameter and I was<br>
>> thinking<br>
>> >> > instead of using a dummy configuration variable for testing I would<br>
>> >> rather<br>
>> >> > add the *health_check_period* and *health_check_period[idx]* so that<br>
>> you<br>
>> >> > can also use it.<br>
>> >> > For that can you tell me where do you want to create<br>
>> health_check_period<br>
>> >> > variable for each backend? Is BackendInfo structure is the right<br>
>> place?<br>
>> >><br>
>> >> I'm working on it for the part. I will push it tomorrow. BTW, unlike<br>
>> >> BackendInfo, the structure does not need to live on the shared memory.<br>
>> >><br>
>> ><br>
>> > Sure thanks, And yes you are right the health_check_period doesn't needs<br>
>> > to go in shared memory,<br>
>> ><br>
>> > You can just push the structure related changes for the<br>
>> health_check_period<br>
>> > parameters and I will make it configurable, that way it will save you the<br>
>> > time and also I will be able to test the changes before pushing the<br>
>> changes.<br>
>><br>
>> Thanks. I have just pushed chages to add the data structure along with<br>
>> sample configuration files changes.<br>
>><br>
>> <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>
>> c0d209d76c67fe10690c33d0a982c0<wbr>fb3b919544<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_<wbr>en.php</a><br>
>> Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
>><br>
>> >> > Thanks<br>
>> >> > Best Regards<br>
>> >> ><br>
>> >> ><br>
>> >> > On Mon, Apr 24, 2017 at 7:42 AM, Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>><br>
>> >> wrote:<br>
>> >> ><br>
>> >> >> >> On 21-Apr-2017, at 4:31 AM, Tatsuo Ishii <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>><br>
>> wrote:<br>
>> >> >> >><br>
>> >> >> >> Usama,<br>
>> >> >> >><br>
>> >> >> >> Is it possible to have following config parameter at the same<br>
>> time?<br>
>> >> >> >> My feeling is we can't because current implementation of config<br>
>> >> >> >> handling does not allow it.<br>
>> >> >> >><br>
>> >> >> >> health_check_period = 10<br>
>> >> >> >> health_check_period0 = 5<br>
>> >> >> ><br>
>> >> >> > Yes, having the same named configuration parameter with and without<br>
>> >> >> index postfix would cause problem with the current implementations,<br>
>> but<br>
>> >> if<br>
>> >> >> we want to support this I can tweak the configuration framework to<br>
>> allow<br>
>> >> >> that.<br>
>> >> >><br>
>> >> >> That would be desirable.<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_<wbr>en.php</a><br>
>> >> >> Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
>> >> >><br>
>> >> >> > Thanks<br>
>> >> >> > Best regards<br>
>> >> >> > Muhammad Usama<br>
>> >> >> ><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_<wbr>en.php</a><br>
>> >> >> >> Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
>> >> >> >><br>
>> >> >> >>> Hi,<br>
>> >> >> >>><br>
>> >> >> >>> This is a Request for Comments on the new implementation of<br>
>> health<br>
>> >> >> >>> check aiming for Pgpool-II 3.7.<br>
>> >> >> >>><br>
>> >> >> >>> Problems:<br>
>> >> >> >>><br>
>> >> >> >>> Current implementation of health check is a single serial<br>
>> processing<br>
>> >> >> >>> for all of database nodes. This implies some limitations for<br>
>> health<br>
>> >> >> >>> check process: 1) it is not possible to specify different health<br>
>> >> check<br>
>> >> >> >>> configuration values for each database node, 2) node failure<br>
>> >> detection<br>
>> >> >> >>> may take longer. For example, if it takes 10 seconds before<br>
>> >> detecting<br>
>> >> >> >>> node 0 failure, then detecting node 1 failure will be delayed at<br>
>> >> least<br>
>> >> >> >>> 10 seconds because it starts node failure detection after node 0.<br>
>> >> >> >>><br>
>> >> >> >>> The solution:<br>
>> >> >> >>><br>
>> >> >> >>> Allow to specify health check parameters for each node.<br>
>> Pgpool.conf<br>
>> >> >> >>> will look like:<br>
>> >> >> >>><br>
>> >> >> >>> health_check_period0 = 10<br>
>> >> >> >>> health_check_timeout0 = 20<br>
>> >> >> >>> :<br>
>> >> >> >>> :<br>
>> >> >> >>><br>
>> >> >> >>> where "0" means database node 0 (similar concept as "backend_*0<br>
>> >> >> >>> parameters).<br>
>> >> >> >>><br>
>> >> >> >>> To make admin's life easier, current parameters can be used as<br>
>> >> >> >>> well. Suppose there are 3 nodes, and we have:<br>
>> >> >> >>><br>
>> >> >> >>> health_check_period = 10<br>
>> >> >> >>> health_check_period0 = 5<br>
>> >> >> >>><br>
>> >> >> >>> then health_check_period for node 1 and 2 will be 10, while<br>
>> >> >> >>> health_check_period for node 0 will be 5. So parameter names<br>
>> without<br>
>> >> >> >>> node id works as a "global variable".<br>
>> >> >> >>><br>
>> >> >> >>> The implementation:<br>
>> >> >> >>><br>
>> >> >> >>> Create separate child process of pgpool main process and let do<br>
>> the<br>
>> >> >> >>> heal check job for each database node. Once the health check<br>
>> child<br>
>> >> >> >>> process detects node failure, it signals to main process and main<br>
>> >> >> >>> process will perform failover.<br>
>> >> >> >>><br>
>> >> >> >>> This architecture makes pgpool main process simpler and robust,<br>
>> >> while<br>
>> >> >> >>> earlier detection of node failure by the health check child<br>
>> process.<br>
>> >> >> >>><br>
>> >> >> >>> Comments and suggestions are welcome.<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_<wbr>en.php</a><br>
>> >> >> >>> Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
>> >> >> >>> ______________________________<wbr>_________________<br>
>> >> >> >>> pgpool-hackers mailing list<br>
>> >> >> >>> <a href="mailto:pgpool-hackers@pgpool.net">pgpool-hackers@pgpool.net</a><br>
>> >> >> >>> <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>
>> >> >><br>
>> >><br>
>><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 "#" 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 "pgpool reload". 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 = 'localhost'<br>
# Host name or IP address to listen on:<br>
# '*' for all, '' for no TCP/IP connections<br>
# (change requires restart)<br>
port = 9999<br>
# Port number<br>
# (change requires restart)<br>
socket_dir = '/tmp'<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 = '*'<br>
# Host name or IP address for pcp process to listen on:<br>
# '*' for all, '' 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 = '/tmp'<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 = 'host1'<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 = '/data'<br>
# Data directory for backend 0<br>
backend_flag0 = 'ALLOW_TO_FAILOVER'<br>
# Controls various backend behavior<br>
# ALLOW_TO_FAILOVER or DISALLOW_TO_FAILOVER<br>
#backend_hostname1 = 'host2'<br>
#backend_port1 = 5433<br>
#backend_weight1 = 1<br>
#backend_data_directory1 = '/data1'<br>
#backend_flag1 = 'ALLOW_TO_FAILOVER'<br>
<br>
# - Authentication -<br>
<br>
enable_pool_hba = off<br>
# Use pool_hba.conf for client authentication<br>
pool_passwd = 'pool_passwd'<br>
# File name of pool_passwd for md5 authentication.<br>
# "" 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 = './server.key'<br>
# Path to the SSL private key file<br>
# (change requires restart)<br>
#ssl_cert = './server.cert'<br>
# Path to the SSL public certificate file<br>
# (change requires restart)<br>
#ssl_ca_cert = ''<br>
# Path to a single PEM format file<br>
# containing CA root certificate(s)<br>
# (change requires restart)<br>
#ssl_ca_cert_dir = ''<br>
# Directory containing CA root 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 = 'stderr'<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 = '%t: pid %p: ' # 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 = 'if_over_threshold'<br>
# Log standby delay<br>
# Valid values are combinations of always,<br>
# if_over_threshold, none<br>
<br>
# - Syslog specific -<br>
<br>
syslog_facility = 'LOCAL0'<br>
# Syslog local facility. Default to LOCAL0<br>
syslog_ident = 'pgpool'<br>
# Syslog program identification string<br>
# Default to 'pgpool'<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 = '/var/run/pgpool/pgpool.pid'<br>
# PID file name<br>
# (change requires restart)<br>
logdir = '/tmp'<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 = 'ABORT; DISCARD ALL'<br>
# The following one is for 8.2 and before<br>
#reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'<br>
<br>
<br>
#-----------------------------<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 = ''<br>
# When rewriting lo_creat command in<br>
# replication mode, specify table name to<br>
# lock<br>
<br>
# - Degenerate handling -<br>
<br>
replication_stop_on_mismatch = off<br>
# On disagreement with the packet kind<br>
# sent from backend, degenerate the node<br>
# which is most likely "minority"<br>
# If off, just force to exit this session<br>
<br>
failover_if_affected_tuples_<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>
# "minority".<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 = ''<br>
# Comma separated list of function names<br>
# that don't write to database<br>
# Regexp are accepted<br>
black_function_list = 'currval,lastval,nextval,<wbr>setval'<br>
# Comma separated list of function names<br>
# that write to database<br>
# Regexp are accepted<br>
<br>
database_redirect_preference_<wbr>list = ''<br>
# comma separated list of pairs of database and node id.<br>
# example: postgres:primary,mydb[0-4]:1,<wbr>mydb[5-9]:2'<br>
# valid for streaming replicaton mode only.<br>
<br>
app_name_redirect_preference_<wbr>list = ''<br>
# comma separated list of pairs of app name and node id.<br>
# example: 'psql:primary,myapp[0-4]:1,<wbr>myapp[5-9]:standby'<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 = 'stream'<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 = 'nobody'<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 = ''<br>
# Password for streaming replication check user<br>
sr_check_database = 'postgres'<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 = ''<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>
# %% = '%' 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 = 'nobody'<br>
# Health check user<br>
health_check_password = ''<br>
# Password for health check user<br>
health_check_database = ''<br>
# Database name for health check. If '', tries 'postgres' 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 = ''<br>
# Executes this command at failover<br>
# Special values:<br>
# %d = node id<br>
# %h = host name<br>
# %p = port number<br>
# %D = database cluster path<br>
# %m = new master node id<br>
# %H = hostname of the new master node<br>
# %M = old master node id<br>
# %P = old primary node id<br>
# %r = new master port number<br>
# %R = new master database cluster path<br>
# %% = '%' character<br>
failback_command = ''<br>
# Executes this command at failback.<br>
# Special values:<br>
# %d = node id<br>
# %h = host name<br>
# %p = port number<br>
# %D = database cluster path<br>
# %m = new master node id<br>
# %H = hostname of the new master node<br>
# %M = old master node id<br>
# %P = old primary node id<br>
# %r = new master port number<br>
# %R = new master database cluster path<br>
# %% = '%' character<br>
<br>
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 = 'nobody'<br>
# Online recovery user<br>
recovery_password = ''<br>
# Online recovery password<br>
recovery_1st_stage_command = ''<br>
# Executes a command in first stage<br>
recovery_2nd_stage_command = ''<br>
# Executes a command in second stage<br>
recovery_timeout = 90<br>
# Timeout in seconds to wait for the<br>
# recovering node's postmaster to start 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 = ''<br>
# trusted server list which are used<br>
# to confirm network connection<br>
# (hostA,hostB,hostC,...)<br>
# (change requires restart)<br>
ping_path = '/bin'<br>
# ping command path<br>
# (change requires restart)<br>
<br>
# - Watchdog communication Settings -<br>
<br>
wd_hostname = ''<br>
# Host name or IP address of this 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 = ''<br>
# Authentication key for watchdog communication<br>
# (change requires restart)<br>
<br>
wd_ipc_socket_dir = '/tmp'<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 = ''<br>
# delegate IP address<br>
# If this is empty, virtual IP never bring up.<br>
# (change requires restart)<br>
if_cmd_path = '/sbin'<br>
# path to the directory where if_up/down_cmd exists<br>
# (change requires restart)<br>
if_up_cmd = 'ip addr add $_IP_$/24 dev eth0 label eth0:0'<br>
# startup delegate IP command<br>
# (change requires restart)<br>
if_down_cmd = 'ip addr del $_IP_$/24 dev eth0'<br>
# shutdown delegate IP command<br>
# (change requires restart)<br>
arping_path = '/usr/sbin'<br>
# arping command path<br>
# (change requires restart)<br>
arping_cmd = 'arping -U $_IP_$ -w 1'<br>
# arping command<br>
# (change requires restart)<br>
<br>
# - Behaivor on escalation Setting -<br>
<br>
clear_memqcache_on_escalation = on<br>
# Clear all the query cache on shared 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 = ''<br>
# Executes this command at escalation on new active pgpool.<br>
# (change requires restart)<br>
wd_de_escalation_command = ''<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 = '' # 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>
# 'any' to enable monitoring on all interfaces except loopback<br>
# '' to disable monitoring<br>
<br>
wd_lifecheck_method = 'heartbeat'<br>
# Method of watchdog lifecheck ('heartbeat' or 'query' or 'external')<br>
# (change requires restart)<br>
wd_interval = 10<br>
# lifecheck interval (sec) > 0<br>
# (change requires restart)<br>
<br>
# -- heartbeat mode --<br>
<br>
wd_heartbeat_port = 9694<br>
# Port number for receiving heartbeat 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 = 'host0_ip1'<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 = ''<br>
# Name of NIC device (such like 'eth0')<br>
# used for sending/receiving heartbeat<br>
# signal to/from destination 0.<br>
# This works only when this is not empty<br>
# and pgpool has root privilege.<br>
# (change requires restart)<br>
<br>
#heartbeat_destination1 = 'host0_ip2'<br>
#heartbeat_destination_port1 = 9694<br>
#heartbeat_device1 = ''<br>
<br>
# -- query mode --<br>
<br>
wd_life_point = 3<br>
# lifecheck retry times<br>
# (change requires restart)<br>
wd_lifecheck_query = 'SELECT 1'<br>
# lifecheck query to pgpool from watchdog<br>
# (change requires restart)<br>
wd_lifecheck_dbname = 'template1'<br>
# Database name connected for lifecheck<br>
# (change requires restart)<br>
wd_lifecheck_user = 'nobody'<br>
# watchdog user monitoring pgpools in lifecheck<br>
# (change requires restart)<br>
wd_lifecheck_password = ''<br>
# Password for watchdog user in lifecheck<br>
# (change requires restart)<br>
<br>
# - Other pgpool Connection Settings -<br>
<br>
#other_pgpool_hostname0 = 'host0'<br>
# Host name or IP address to connect to for other pgpool 0<br>
# (change requires restart)<br>
#other_pgpool_port0 = 5432<br>
# Port number for othet pgpool 0<br>
# (change requires restart)<br>
#other_wd_port0 = 9000<br>
# Port number for othet watchdog 0<br>
# (change requires restart)<br>
#other_pgpool_hostname1 = 'host1'<br>
#other_pgpool_port1 = 5432<br>
#other_wd_port1 = 9000<br>
<br>
<br>
#-----------------------------<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'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>
# "pool_search_relcache: cache replacement happend"<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 = 'shmem'<br>
# Cache storage method. either 'shmem'(shared memory) or<br>
# 'memcached'. 'shmem' by default<br>
# (change requires restart)<br>
memqcache_memcached_host = 'localhost'<br>
# Memcached host name or IP address. Mandatory if<br>
# memqcache_method = 'memcached'.<br>
# Defaults to localhost.<br>
# (change requires restart)<br>
memqcache_memcached_port = 11211<br>
# Memcached port number. Mondatory if memqcache_method = 'memcached'.<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 = 'shmem'.<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 = 'shmem'.<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 = 'shmem'.<br>
# Defaults to 1MB.<br>
# (change requires restart)<br>
memqcache_oiddir = '/var/log/pgpool/oiddir'<br>
# Temporary work directory to record table oids<br>
# (change requires restart)<br>
white_memqcache_table_list = ''<br>
# Comma separated list of table names to memcache<br>
# that don't write to database<br>
# Regexp are accepted<br>
black_memqcache_table_list = ''<br>
# Comma separated list of table names not to memcache<br>
# that don't write to database<br>
# Regexp are accepted<br>
sr_check_user = 't-ishii'<br>
recovery_user = 't-ishii'<br>
recovery_password = ''<br>
recovery_1st_stage_command = 'basebackup.sh'<br>
health_check_period = 10<br>
health_check_user = 't-ishii'<br>
memqcache_oiddir = '/home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/log/pgpool/<wbr>oiddir'<br>
log_per_node_statement = on<br>
failover_command = '/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'<br>
socket_dir = '/tmp'<br>
pcp_socket_dir = '/tmp'<br>
port = 11000<br>
pcp_port = 11001<br>
pid_file_name = '/home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/run/pgpool.<wbr>pid'<br>
logdir = '/home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/log'<br>
backend_hostname0 = '/tmp'<br>
backend_port0 = 11002<br>
backend_weight0 = 1<br>
backend_data_directory0 = '/home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/data0'<br>
#backend_hostname1 = '/tmp'<br>
backend_hostname1 = '133.137.175.105'<br>
backend_port1 = 11003<br>
backend_weight1 = 1<br>
backend_data_directory1 = '/home/t-ishii/work/pgpool-II/<wbr>current/Bugs/bug301-memcache-<wbr>segfault/testdir/data1'<br>
follow_master_command = '/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'<br>
memory_cache_enabled = on<br>
memqcache_method = 'memcached'<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>