pgpool2.git / summary / log / commit / refs
commit 3433ec961899cd75c377225f7e983391edfc2c3e
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Tue May 15 08:27:13 2018 +0000
Fix fail to handle replication slot environment variable.
This causes script errors.
src/test/pgpool_setup | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/test/pgpool_setup b/src/test/pgpool_setup
index 4d60205c4..b880dab36 100755
--- a/src/test/pgpool_setup
+++ b/src/test/pgpool_setup
@@ -292,7 +292,7 @@ function set_postgresql_conf
echo "wal_level = hot_standby" >> $PGCONF
echo "max_wal_senders = $NUMCLUSTERS" >> $PGCONF
- if [ $USE_SLOT = "false" ];then
+ if [ $USE_REPLICATION_SLOT = "false" ];then
echo "archive_mode = on" >> $PGCONF
echo "archive_command = 'cp %p $BASEDIR/archivedir/%f </dev/null'" >> $PGCONF
else
@@ -386,7 +386,7 @@ rm $DEST_CLUSTER/recovery.done
fi
EOF
-if [ $USE_SLOT = "true" ];then
+if [ $USE_REPLICATION_SLOT = "true" ];then
cat >> $1/$SCRIPT <<'EOF'
$psql -p $PORT -c "SELECT * FROM pg_create_physical_replication_slot('pgpool_setup_slot$recovery_node')" postgres
EOF
@@ -399,7 +399,7 @@ primary_conninfo = 'port=$PORT user=$PGSUPERUSER'
recovery_target_timeline='latest'
EOF
-if [ $USE_SLOT = "false" ];then
+if [ $USE_REPLICATION_SLOT = "false" ];then
cat >> $1/$SCRIPT <<'EOF'
restore_command = 'cp $DATADIR_BASE/archivedir/%f "%p" 2> /dev/null'
REOF
@@ -546,7 +546,7 @@ standby_mode = 'on'
primary_conninfo = 'port=$BASEPORT user=$WHOAMI'
recovery_target_timeline='latest'
EOF
-if [ $USE_SLOT = true ];then
+if [ $USE_REPLICATION_SLOT = true ];then
echo "primary_slot_name = 'pgpool_setup_slot$2'" >> $1/$fname
else
cat >> $1/$fname <<EOF
@@ -677,7 +677,7 @@ do
elif [ $1 = "-d" ];then
PGPOOLDEBUG="true"
elif [ $1 = "-s" ];then
- USE_SLOT="true"
+ USE_REPLICATION_SLOT="true"
elif [ $1 = "-r" ];then
USE_PG_REWIND="true"
elif [ $1 = "--help" -o $1 = "-o" ];then
@@ -710,7 +710,7 @@ esac
# If USE_REPLICATION_SLOT is provided as an environment variable, turn on -s
if [ a$USE_REPLICATION_SLOT = a"true" ];then
- USE_SLOT="true"
+ USE_REPLICATION_SLOT="true"
fi
# If USE_PG_REWIND is provided as an environment variable, turn on -r
@@ -851,7 +851,7 @@ $PGPOOL_INSTALL_DIR/bin/pg_md5 $WHOAMI >> etc/pcp.conf
# create pool_passwd
$PGPOOL_INSTALL_DIR/bin/pg_md5 -m -f etc/pgpool.conf -u $WHOAMI $WHOAMI
-if [ $USE_SLOT = "false" ];then
+if [ $USE_REPLICATION_SLOT = "false" ];then
# create archive directory
mkdir archivedir
fi
@@ -870,7 +870,7 @@ CREATE EXTENSION pgpool_regclass;
CREATE EXTENSION pgpool_recovery;
CREATE DATABASE test;
EOF
- if [ $USE_SLOT = "true" ];then
+ if [ $USE_REPLICATION_SLOT = "true" ];then
n=0
while [ $n -lt $NUMCLUSTERS ]
do
[parent: edd10f606151]