<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Tatsuo, I hope this&nbsp;email&nbsp;finds you well</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
in the log below at the end of the failover process&nbsp;</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">pgpool does not promote one of the servers to primary role,</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">you are more than welcome to see attached logs and configuration&nbsp;</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks :)</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">+ psql -U XXXX -h 10.65.181.99 -p 9999 -c 'show pool_nodes'<br>
&nbsp;node_id | hostname&nbsp; | port | status | lb_weight |&nbsp; role&nbsp;&nbsp; | select_cnt | load_balance_node | replication_delay<br>
---------+-----------+------+--------+-----------+---------+------------+-------------------+-------------------<br>
&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 1.1.1.100 | 5432 | up&nbsp;&nbsp;&nbsp;&nbsp; | 0.500000&nbsp; | primary | 948945&nbsp;&nbsp;&nbsp;&nbsp; | true&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 0<br>
&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 1.1.1.101 | 5432 | up&nbsp;&nbsp;&nbsp;&nbsp; | 0.500000&nbsp; | standby | 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | false&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 0<br>
(2 rows)<br>
<br>
+ monit stop postgresql9&nbsp; &lt;--- on 1.1.1.100 <br>
<br>
psql -U XXXXX&nbsp; -h 10.65.181.99 -p 9999 -c 'show pool_nodes'<br>
&nbsp;node_id | hostname&nbsp; | port | status | lb_weight |&nbsp; role&nbsp;&nbsp; | select_cnt | load_balance_node | replication_delay<br>
---------+-----------+------+--------+-----------+---------+------------+-------------------+-------------------<br>
&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 1.1.1.100 | 5432 | up&nbsp;&nbsp;&nbsp;&nbsp; | 0.500000&nbsp; | primary | 948945&nbsp;&nbsp;&nbsp;&nbsp; | true&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 0<br>
&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 1.1.1.101 | 5432 | up&nbsp;&nbsp;&nbsp;&nbsp; | 0.500000&nbsp; | standby | 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | false&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 0<br>
(2 rows)<br>
+ psql -U XXXXX -h 10.65.181.99 -p 9999 -c 'show pool_nodes'<br>
&nbsp;node_id | hostname&nbsp; | port | status | lb_weight |&nbsp; role&nbsp;&nbsp; | select_cnt | load_balance_node | replication_delay<br>
---------+-----------+------+--------+-----------+---------+------------+-------------------+-------------------<br>
&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 1.1.1.100 | 5432 | down&nbsp;&nbsp; | 0.500000&nbsp; | standby | 948945&nbsp;&nbsp;&nbsp;&nbsp; | false&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 0<br>
&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 1.1.1.101 | 5432 | up&nbsp;&nbsp;&nbsp;&nbsp; | 0.500000&nbsp; | standby | 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | true&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 0<br>
(2 rows)<br>
<br>
<br>
--- logfile pgpool&nbsp; primary<br>
2020-07-20 09:24:11: pid 4076: LOG:&nbsp; failed to connect to PostgreSQL server on &quot;1.1.1.100:5432&quot;, getsockopt() detected error &quot;Connection refused&quot;<br>
2020-07-20 09:24:11: pid 4076: ERROR:&nbsp; failed to make persistent db connection<br>
2020-07-20 09:24:11: pid 4076: LOG:&nbsp; pgpool-II successfully started. version 3.6.6 (subaruboshi)<br>
2020-07-20 09:24:11: pid 4076: LOG:&nbsp; failed to connect to PostgreSQL server on &quot;1.1.1.100:5432&quot;, getsockopt() detected error &quot;Connection refused&quot;<br>
2020-07-20 09:24:11: pid 4076: ERROR:&nbsp; failed to make persistent db connection<br>
2020-07-20 09:24:11: pid 4076: LOG:&nbsp; setting backend node 0 status to NODE DOWN<br>
2020-07-20 09:24:11: pid 4076: LOG:&nbsp; received degenerate backend request for node_id: 0 from pid [4076]<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; new IPC connection received<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; watchdog received the failover command from local pgpool-II on IPC interface<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; watchdog is processing the failover command [DEGENERATE_BACKEND_REQUEST] received from local pgpool-II on IPC interface<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; forwarding the failover request [DEGENERATE_BACKEND_REQUEST] to all alive nodes<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; new IPC connection received<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; received the failover command lock request from local pgpool-II on IPC interface<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; local pgpool-II node &quot;1.1.1.100:9999 Linux mgrdb100&quot; is requesting to become a lock holder for failover ID: 3424<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; local pgpool-II node &quot;1.1.1.100:9999 Linux mgrdb100&quot; is the lock holder<br>
2020-07-20 09:24:11: pid 4076: LOG:&nbsp; starting degeneration. shutdown host 1.1.1.100(5432)<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; received the failover command lock request from remote pgpool-II node &quot;1.1.1.101:9999 Linux mgrdb101&quot;<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; remote pgpool-II node &quot;1.1.1.101:9999 Linux mgrdb101&quot; is requesting to become a lock holder for failover ID: 3424<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; lock holder request denied to remote pgpool-II node &quot;1.1.1.101:9999 Linux mgrdb101&quot;<br>
2020-07-20 09:24:11: pid 4076: LOG:&nbsp; Restart all children<br>
2020-07-20 09:24:11: pid 4076: LOG:&nbsp; execute command: /etc/pgpool-II/recovery/failover.sh 0 0 1.1.1.101 /home/postgres/databases/SECRET<br>
+ FALLING_NODE=0<br>
+ OLDPRIMARY_NODE=0<br>
+ NEW_PRIMARY=1.1.1.101<br>
+ PGDATA=/home/postgres/databases/SECRET<br>
+ PGHOME=/home/postgres<br>
+ log 'failover to 1.1.1.101 host. creating /home/postgres/databases/SECRET/trigger file.'<br>
+ '[' '!' 'failover to 1.1.1.101 host. creating /home/postgres/databases/SECRET/trigger file.' ']'<br>
++ /bin/date '+%m/%d/%y %H:%M:%S.%2N'<br>
+ /bin/echo '[07/20/20 09:24:11.04] - failover to 1.1.1.101 host. creating /home/postgres/databases/SECRET/trigger file.'<br>
+ '[' 0 = 0 ']'<br>
+ '[' 0 -eq 0 ']'<br>
+ su postgres -c 'ssh -T postgres@1.1.1.101 touch /home/postgres/databases/SECRET/trigger'<br>
2020-07-20 09:24:11: pid 4262: LOG:&nbsp; failed to connect to PostgreSQL server on &quot;1.1.1.100:5432&quot;, getsockopt() detected error &quot;Connection refused&quot;<br>
2020-07-20 09:24:11: pid 4262: ERROR:&nbsp; failed to make persistent db connection<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; received the failover command lock request from remote pgpool-II node &quot;1.1.1.101:9999 Linux mgrdb101&quot;<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; remote pgpool-II node &quot;1.1.1.101:9999 Linux mgrdb101&quot; is checking the status of [FAILOVER] lock for failover ID 3424<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; FAILOVER lock is currently LOCKED<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; received the failover command lock request from remote pgpool-II node &quot;1.1.1.101:9999 Linux mgrdb101&quot;<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; remote pgpool-II node &quot;1.1.1.101:9999 Linux mgrdb101&quot; is checking the status of [FAILOVER] lock for failover ID 3424<br>
2020-07-20 09:24:11: pid 4078: LOG:&nbsp; FAILOVER lock is currently LOCKED<br>
+ exit 0<br>
2020-07-20 09:24:12: pid 4078: LOG:&nbsp; new IPC connection received<br>
2020-07-20 09:24:12: pid 4078: LOG:&nbsp; received the failover command lock request from local pgpool-II on IPC interface<br>
2020-07-20 09:24:12: pid 4078: LOG:&nbsp; local pgpool-II node &quot;1.1.1.100:9999 Linux mgrdb100&quot; is requesting to release [FAILOVER] lock for failover ID 3424<br>
2020-07-20 09:24:12: pid 4078: LOG:&nbsp; local pgpool-II node &quot;1.1.1.100:9999 Linux mgrdb100&quot; has released the [FAILOVER] lock for failover ID 3424<br>
2020-07-20 09:24:12: pid 4076: LOG:&nbsp; find_primary_node_repeatedly: waiting for finding a primary node<br>
2020-07-20 09:24:12: pid 4076: LOG:&nbsp; find_primary_node: checking backend no 0<br>
2020-07-20 09:24:12: pid 4076: LOG:&nbsp; find_primary_node: checking backend no 1<br>
2020-07-20 09:24:12: pid 4262: ERROR:&nbsp; Failed to check replication time lag<br>
2020-07-20 09:24:12: pid 4262: HINT:&nbsp; check sr_check_user and sr_check_password<br>
2020-07-20 09:24:12: pid 4262: LOG:&nbsp; failed to connect to PostgreSQL server on &quot;1.1.1.100:5432&quot;, getsockopt() detected error &quot;Connection refused&quot;<br>
2020-07-20 09:24:12: pid 4262: ERROR:&nbsp; failed to make persistent db connection<br>
2020-07-20 09:24:12: pid 4078: LOG:&nbsp; received the failover command lock request from remote pgpool-II node &quot;1.1.1.101:9999 Linux mgrdb101&quot;<br>
2020-07-20 09:24:12: pid 4078: LOG:&nbsp; remote pgpool-II node &quot;1.1.1.101:9999 Linux mgrdb101&quot; is checking the status of [FAILOVER] lock for failover ID 3424<br>
2020-07-20 09:24:12: pid 4078: LOG:&nbsp; FAILOVER lock is currently FREE<br>
2020-07-20 09:24:13: pid 4076: LOG:&nbsp; find_primary_node: checking backend no 0<br>
2020-07-20 09:24:13: pid 4076: LOG:&nbsp; find_primary_node: checking backend no 1<br>
2020-07-20 09:24:13: pid 4262: ERROR:&nbsp; Failed to check replication time lag<br>
2020-07-20 09:24:13: pid 4262: HINT:&nbsp; check sr_check_user and sr_check_password<br>
2020-07-20 09:24:13: pid 4262: LOG:&nbsp; failed to connect to PostgreSQL server on &quot;1.1.1.100:5432&quot;, getsockopt() detected error &quot;Connection refused&quot;<br>
2020-07-20 09:24:13: pid 4262: ERROR:&nbsp; failed to make persistent db connection<br>
2020-07-20 09:24:14: pid 4076: LOG:&nbsp; find_primary_node: checking backend no 0<br>
2020-07-20 09:24:14: pid 4076: LOG:&nbsp; find_primary_node: checking backend no 1<br>
2020-07-20 09:24:14: pid 4262: ERROR:&nbsp; Failed to check replication time lag<br>
2020-07-20 09:24:14: pid 4262: HINT:&nbsp; check sr_check_user and sr_check_password<br>
2020-07-20 09:24:14: pid 4262: LOG:&nbsp; failed to connect to PostgreSQL server on &quot;1.1.1.100:5432&quot;, getsockopt() detected error &quot;Connection refused&quot;<br>
2020-07-20 09:24:14: pid 4262: ERROR:&nbsp; failed to make persistent db connection<br>
2020-07-20 09:24:15: pid 4078: LOG:&nbsp; new IPC connection received<br>
2020-07-20 09:24:15: pid 4078: LOG:&nbsp; received the failover command lock request from local pgpool-II on IPC interface<br>
2020-07-20 09:24:15: pid 4078: LOG:&nbsp; local pgpool-II node &quot;1.1.1.100:9999 Linux mgrdb100&quot; is requesting to release [FOLLOW MASTER] lock for failover ID 3424<br>
2020-07-20 09:24:15: pid 4078: LOG:&nbsp; local pgpool-II node &quot;1.1.1.100:9999 Linux mgrdb100&quot; has released the [FOLLOW MASTER] lock for failover ID 3424<br>
2020-07-20 09:24:15: pid 4076: LOG:&nbsp; failover: set new primary node: -1<br>
2020-07-20 09:24:15: pid 4076: LOG:&nbsp; failover: set new master node: 1<br>
2020-07-20 09:24:15: pid 4262: ERROR:&nbsp; Failed to check replication time lag<br>
2020-07-20 09:24:15: pid 4262: HINT:&nbsp; check sr_check_user and sr_check_password<br>
2020-07-20 09:24:15: pid 4262: LOG:&nbsp; failed to connect to PostgreSQL server on &quot;1.1.1.100:5432&quot;, getsockopt() detected error &quot;Connection refused&quot;<br>
2020-07-20 09:24:15: pid 4262: ERROR:&nbsp; failed to make persistent db connection<br>
2020-07-20 09:24:15: pid 4078: LOG:&nbsp; received the failover command lock request from remote pgpool-II node &quot;1.1.1.101:9999 Linux mgrdb101&quot;<br>
2020-07-20 09:24:15: pid 4078: LOG:&nbsp; remote pgpool-II node &quot;1.1.1.101:9999 Linux mgrdb101&quot; is checking the status of [FOLLOW MASTER] lock for failover ID 3424<br>
2020-07-20 09:24:15: pid 4078: LOG:&nbsp; FOLLOW MASTER lock is currently FREE<br>
2020-07-20 09:24:15: pid 4262: LOG:&nbsp; worker process received restart request<br>
2020-07-20 09:24:15: pid 4078: LOG:&nbsp; new IPC connection received<br>
2020-07-20 09:24:15: pid 4078: LOG:&nbsp; received the failover command lock request from local pgpool-II on IPC interface<br>
2020-07-20 09:24:15: pid 4078: LOG:&nbsp; local pgpool-II node &quot;1.1.1.100:9999 Linux mgrdb100&quot; is requesting to resign from a lock holder for failover ID 3424<br>
2020-07-20 09:24:15: pid 4078: LOG:&nbsp; local pgpool-II node &quot;1.1.1.100:9999 Linux mgrdb100&quot; has resigned from the lock holder<br>
failover done. shutdown host 1.1.1.100(5432)2020-07-20 09:24:15: pid 4076: LOG:&nbsp; failover done. shutdown host 1.1.1.100(5432)<br>
2020-07-20 09:24:16: pid 4261: LOG:&nbsp; restart request received in pcp child process<br>
2020-07-20 09:24:16: pid 4076: LOG:&nbsp; PCP child 4261 exits with status 0 in failover()<br>
2020-07-20 09:24:16: pid 4076: LOG:&nbsp; fork a new PCP child pid 1144 in failover()<br>
2020-07-20 09:24:16: pid 4076: LOG:&nbsp; pgpool-II successfully started. version 3.6.6 (subaruboshi)<br>
<br>
----<br>
# ----------------------------<br>
# pgPool-II configuration file<br>
# ----------------------------<br>
#<br>
# This file consists of lines of the form:<br>
#<br>
#&nbsp;&nbsp; name = value<br>
#<br>
# Whitespace may be used.&nbsp; 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.&nbsp; 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;.&nbsp; Some<br>
# parameters, which are marked below, require a server shutdown and restart to<br>
# take effect.<br>
#<br>
<br>
log_min_messages = DEBUG1<br>
<br>
#------------------------------------------------------------------------------<br>
# CONNECTIONS<br>
#------------------------------------------------------------------------------<br>
<br>
# - pgpool Connection Settings -<br>
<br>
listen_addresses='*'<br>
# Host name or IP address to listen on:<br>
# '*' for all, '' for no TCP/IP connections<br>
# (change requires restart)<br>
port=9999<br>
# Port number<br>
# (change requires restart)<br>
socket_dir='/var/run/postgresql'<br>
# Unix domain socket path<br>
# The Debian package defaults to<br>
# /var/run/postgresql<br>
# (change requires restart)<br>
listen_backlog_multiplier=1<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>
# - 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='/var/run/postgresql'<br>
# Unix domain socket path for pcp<br>
# The Debian package defaults to<br>
# /var/run/postgresql<br>
# (change requires restart)<br>
<br>
# - Backend Connection Settings -<br>
<br>
backend_hostname0='1.1.1.100'<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='/home/postgres/databases/SECRET'<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=on<br>
# Use pool_hba.conf for client authentication<br>
pool_passwd='pool_passwd'<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 = './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>
#------------------------------------------------------------------------------<br>
# POOLS<br>
#------------------------------------------------------------------------------<br>
<br>
# - Concurrent session and pool size -<br>
<br>
num_init_children=160<br>
# Number of concurrent sessions allowed<br>
# (change requires restart)<br>
max_pool=1<br>
# Number of connection pool caches per connection<br>
# (change requires restart)<br>
<br>
# - Life time -<br>
<br>
child_life_time=1<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>
#------------------------------------------------------------------------------<br>
# LOGS<br>
#------------------------------------------------------------------------------<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='none'<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>
#log_error_verbosity = default&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # terse, default, or verbose messages<br>
<br>
#client_min_messages = notice&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # values in order of decreasing detail:<br>
#&nbsp;&nbsp; debug5<br>
#&nbsp;&nbsp; debug4<br>
#&nbsp;&nbsp; debug3<br>
#&nbsp;&nbsp; debug2<br>
#&nbsp;&nbsp; debug1<br>
#&nbsp;&nbsp; log<br>
#&nbsp;&nbsp; notice<br>
#&nbsp;&nbsp; warning<br>
#&nbsp;&nbsp; error<br>
<br>
#log_min_messages = warning&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # values in order of decreasing detail:<br>
#&nbsp;&nbsp; debug5<br>
#&nbsp;&nbsp; debug4<br>
#&nbsp;&nbsp; debug3<br>
#&nbsp;&nbsp; debug2<br>
#&nbsp;&nbsp; debug1<br>
#&nbsp;&nbsp; info<br>
#&nbsp;&nbsp; notice<br>
#&nbsp;&nbsp; warning<br>
#&nbsp;&nbsp; error<br>
#&nbsp;&nbsp; log<br>
#&nbsp;&nbsp; fatal<br>
#&nbsp;&nbsp; panic<br>
<br>
#------------------------------------------------------------------------------<br>
# FILE LOCATIONS<br>
#------------------------------------------------------------------------------<br>
<br>
pid_file_name='/var/run/pgpool.pid'<br>
# PID file name<br>
# Can be specified as relative to the&quot;<br>
# location of pgpool.conf file or<br>
# as an absolute path<br>
# (change requires restart)<br>
logdir='/var/log'<br>
# Directory of pgPool status file<br>
# (change requires restart)<br>
<br>
<br>
#------------------------------------------------------------------------------<br>
# CONNECTION POOLING<br>
#------------------------------------------------------------------------------<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>
#------------------------------------------------------------------------------<br>
# REPLICATION MODE<br>
#------------------------------------------------------------------------------<br>
<br>
replication_mode=off<br>
# Activate replication mode<br>
# (change requires restart)<br>
replicate_select=off<br>
# Replicate SELECT statements<br>
# when in replication 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 &quot;minority&quot;<br>
# If off, just force to exit this session<br>
<br>
failover_if_affected_tuples_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>
#------------------------------------------------------------------------------<br>
# LOAD BALANCING MODE<br>
#------------------------------------------------------------------------------<br>
<br>
load_balance_mode=off<br>
# Activate load balancing mode<br>
# (change requires restart)<br>
ignore_leading_white_space=on<br>
# Ignore leading white spaces of each 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,setval'<br>
# Comma separated list of function names<br>
# that write to database<br>
# Regexp are accepted<br>
<br>
database_redirect_preference_list=''<br>
# comma separated list of pairs of database and node id.<br>
# example: postgres:primary,mydb[0-4]:1,mydb[5-9]:2'<br>
# valid for streaming replicaton mode only.<br>
<br>
app_name_redirect_preference_list=''<br>
# comma separated list of pairs of app name and node id.<br>
# example: 'psql:primary,myapp[0-4]:1,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>
#------------------------------------------------------------------------------<br>
# MASTER/SLAVE MODE<br>
#------------------------------------------------------------------------------<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=1<br>
# Streaming replication check period<br>
# Disabled (0) by default<br>
sr_check_user='SECRET'<br>
# Streaming replication check user<br>
# This is necessary even if you disable<br>
# streaming replication delay check with<br>
# sr_check_period = 0<br>
sr_check_password='SECRET'<br>
# Password for streaming replication check user<br>
sr_check_database='postgres'<br>
# Database name for streaming replication check<br>
delay_threshold=0<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>
#&nbsp;&nbsp; %d = node id<br>
#&nbsp;&nbsp; %h = host name<br>
#&nbsp;&nbsp; %p = port number<br>
#&nbsp;&nbsp; %D = database cluster path<br>
#&nbsp;&nbsp; %m = new master node id<br>
#&nbsp;&nbsp; %H = hostname of the new master node<br>
#&nbsp;&nbsp; %M = old master node id<br>
#&nbsp;&nbsp; %P = old primary node id<br>
#&nbsp;&nbsp; %r = new master port number<br>
#&nbsp;&nbsp; %R = new master database cluster path<br>
#&nbsp;&nbsp; %% = '%' character<br>
<br>
#------------------------------------------------------------------------------<br>
# HEALTH CHECK<br>
#------------------------------------------------------------------------------<br>
<br>
health_check_period=1<br>
# Health check period<br>
# Disabled (0) by default<br>
health_check_timeout=0<br>
# Health check timeout<br>
# 0 means no timeout<br>
health_check_user='SECRET'<br>
# Health check user<br>
health_check_password='SECRET'<br>
# Password for health check user<br>
health_check_database=''<br>
# Database name for health check. If '', tries 'postgres' frist, then 'template1'<br>
<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>
#------------------------------------------------------------------------------<br>
# FAILOVER AND FAILBACK<br>
#------------------------------------------------------------------------------<br>
<br>
failover_command='/etc/pgpool-II/recovery/failover.sh %d %P %H %R'<br>
# Executes this command at failover<br>
# Special values:<br>
#&nbsp;&nbsp; %d = node id<br>
#&nbsp;&nbsp; %h = host name<br>
#&nbsp;&nbsp; %p = port number<br>
#&nbsp;&nbsp; %D = database cluster path<br>
#&nbsp;&nbsp; %m = new master node id<br>
#&nbsp;&nbsp; %H = hostname of the new master node<br>
#&nbsp;&nbsp; %M = old master node id<br>
#&nbsp;&nbsp; %P = old primary node id<br>
#&nbsp;&nbsp; %r = new master port number<br>
#&nbsp;&nbsp; %R = new master database cluster path<br>
#&nbsp;&nbsp; %% = '%' character<br>
failback_command=''<br>
# Executes this command at failback.<br>
# Special values:<br>
#&nbsp;&nbsp; %d = node id<br>
#&nbsp;&nbsp; %h = host name<br>
#&nbsp;&nbsp; %p = port number<br>
#&nbsp;&nbsp; %D = database cluster path<br>
#&nbsp;&nbsp; %m = new master node id<br>
#&nbsp;&nbsp; %H = hostname of the new master node<br>
#&nbsp;&nbsp; %M = old master node id<br>
#&nbsp;&nbsp; %P = old primary node id<br>
#&nbsp;&nbsp; %r = new master port number<br>
#&nbsp;&nbsp; %R = new master database cluster path<br>
#&nbsp;&nbsp; %% = '%' 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=3<br>
# Timeout in seconds to search for the<br>
# primary node when a failover occurs.<br>
# 0 means no timeout, keep searching<br>
# for a primary node forever.<br>
<br>
#------------------------------------------------------------------------------<br>
# ONLINE RECOVERY<br>
#------------------------------------------------------------------------------<br>
<br>
recovery_user='SECRET'<br>
# Online recovery user<br>
recovery_password='SECRET'<br>
# Online recovery password<br>
recovery_1st_stage_command='recovery_1st_stage'<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>
#------------------------------------------------------------------------------<br>
# WATCHDOG<br>
#------------------------------------------------------------------------------<br>
<br>
# - Enabling -<br>
<br>
use_watchdog=on<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='1.1.1.100'<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='/var/run/postgresql'<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='10.65.181.99'<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='ifconfig eth0:pg inet $_IP_$ netmask 255.255.192.0 up'<br>
# startup delegate IP command<br>
# (change requires restart)<br>
if_down_cmd='ifconfig eth0:pg down'<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>
<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) &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='1.1.1.101'<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='eth1'<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='SECRET'<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>
#------------------------------------------------------------------------------<br>
# OTHERS<br>
#------------------------------------------------------------------------------<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>
<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>
#------------------------------------------------------------------------------<br>
# IN MEMORY QUERY MEMORY CACHE<br>
#------------------------------------------------------------------------------<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_invalidation=on<br>
# If on, invalidation of query cache is triggered by corresponding<br>
# DDL/DML/DCL(and memqcache_expire).&nbsp; If off, it is only triggered<br>
# by memqcache_expire.&nbsp; 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>
backend_weight1=1<br>
backend_port1=5432<br>
other_wd_port0=9000<br>
backend_data_directory1='/home/postgres/databases/SECRET'<br>
other_pgpool_hostname0='1.1.1.101'<br>
other_pgpool_port0=9999<br>
backend_flag1='ALLOW_TO_FAILOVER'<br>
backend_hostname1='1.1.1.101'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Comma separated list of table names not to memcache<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # that don't write to database<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Regexp are accepted<br>
<br>
<br>
<br>
</div>
</span></font></div>
</div>
::DISCLAIMER:: E-mail communication is confidential and intended solely for the addressee(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you believe the e-mail message has been sent to you in error, please notify the sender by
 replying to the e-mail transmission and delete the message without disclosing it. Thank you.
</body>
</html>