# We set connection_cache to off so that each time client connects
# to pgpool, it receives ready for query from backend.
# We set synchronous_commit = remote_apply, and synchronous_standby_names = 'server1'
- # so that updation to primary is replicated to standby with no lag.
+ # in streaming replication mode so that updation to primary is replicated to standby with no lag.
cat >> etc/pgpool.conf <<EOF
backend_weight0 = 0
client_min_messages = log
log_per_node_statement = off
connection_cache = off
+EOF
+ if [ $mode = "s" ];then
+ cat >> data0/postgresql.conf <<EOF
synchronous_commit = remote_apply
synchronous_standby_names = 'server1'
EOF
+ fi
for option in none terse verbose
do
echo "==== mode: $mode option: $option ===" >> result