pgpool2.git / summary / log / commit / refs

commit    b3d499e59c3cf166c2c4efa96e646da63b54f7f7
Author:   Tatsuo Ishii <ishii@sraoss.co.jp>
Date:     Thu Aug 08 02:38:02 2019 +0000

    Make waiting for TIME_WAIT in pgpool_setup optional.
    
    Since commit 3b32bc4e583da700cc8df7c5777e90341655ad3b the shutdownall
    script generated by pgpool_setup waits for Pgpool-II socket in
    TIME_WAIT state disappeared. However in most cases this takes long
    time and it makes uncomfortable for developer's testing works.
    
    This commit makes the wait to be optional: unless environment variable
    "CHECK_TIME_WAIT" is set to other than "false", it never waits for the
    TIME_WAIT state.


src/test/pgpool_setup | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/test/pgpool_setup b/src/test/pgpool_setup index 27ca30e22..2bd193fe7 100755 --- a/src/test/pgpool_setup +++ b/src/test/pgpool_setup @@ -81,7 +81,8 @@ INITDBARG="--no-locale -E UTF_8 --data-checksums" USE_REPLICATION_SLOT=${USE_REPLICATION_SLOT:-"false"} # Use pg_rewind USE_PG_REWIND=${USE_PG_REWIND:-"false"} - +# Check TIME_WAIT in shutdownall script +CHECK_TIME_WAIT=${CHECK_TIME_WAIT:-"false"} #------------------------------------------- # End of configuration section #------------------------------------------- @@ -831,7 +832,9 @@ echo 'dir=`pwd`' > $SHUTDOWNALL echo "PGPOOL_INSTALL_DIR=$PGPOOL_INSTALL_DIR" >> $SHUTDOWNALL echo '$PGPOOL_INSTALL_DIR/bin/pgpool -f $dir/etc/pgpool.conf -m f stop' >> $SHUTDOWNALL echo 'while [ -f $dir/run/pgpool.pid ];do sleep 1;done' >> $SHUTDOWNALL -echo "while netstat -a|grep $ORIGBASEPORT ;do sleep 1;done" >> $SHUTDOWNALL +if [ $CHECK_TIME_WAIT != "false" ];then + echo "while netstat -a|grep $ORIGBASEPORT ;do sleep 1;done" >> $SHUTDOWNALL +fi chmod 755 $SHUTDOWNALL echo 'dir=`pwd`' > $PGPOOL_RELOAD echo "PGPOOL_INSTALL_DIR=$PGPOOL_INSTALL_DIR" >> $PGPOOL_RELOAD [parent: 89562a4beb05]