pgpool2.git / summary / log / commit / refs

commit    fc65ab869859384bee074526c944b577abb0dd33
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Mon Jul 22 08:41:32 2013 +0000

    Fix bug introduced in 8b803e1ea38c3ac9a7775f7fb9ba43870bca7dca (Add wait_for_pgpool_reload function).
    Add -p option to specify start port #.


test/pgpool_setup | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/test/pgpool_setup b/test/pgpool_setup index f546d6902..9fa06ae70 100755 --- a/test/pgpool_setup +++ b/test/pgpool_setup @@ -16,12 +16,16 @@ # directory for *testing* purpose. # Do not use this tool for production environment! # -# usage: pgpool_setup [-m r|s][-n num_clusters][--no-stop] +# usage: pgpool_setup [-m r|s][-n num_clusters][-p base_port][--no-stop] # -m s: create an installation as streaming replication mode. # (the default) # -m r: create an installation as native replication mode. -#-n num_clusters: create num_clusters PostgreSQL database cluster nodes -#--no-stop: do not stop pgpool and PostgreSQL after the work +# -n num_clusters: create num_clusters PostgreSQL database cluster nodes +# -p base_port: specify base port. The first PostgreSQL node's port is +# -base_port. Second PostgreSQL node's port is base_port+1... nth +# PostgreSQL node's port is base_port+n-1, pgpool port is +# base_port+n, pcp port is base_port+n+1. +# --no-stop: do not stop pgpool and PostgreSQL after the work # # The user run this script will become the PostgreSQL super user as # well. Current directory must be empty. Assume that appropreate @@ -233,7 +237,7 @@ DEST=$1 DESTDIR=$2 PGCTL=__PGBIN__/pg_ctl -ssh -T $PGCTL -w -D $DESTDIR start 2>/dev/null 1>/dev/null < /dev/null & +ssh -T $DEST $PGCTL -w -D $DESTDIR start 2>/dev/null 1>/dev/null < /dev/null & EOF #------------------------------------------- @@ -584,12 +588,12 @@ function wait_for_pgpool_reload { ################################################################################ function usage() { - echo "usage: $0 [-m r|s] [-n num_clusters] [--no-stop] ";exit 1 + echo "usage: $0 [-m r|s] [-n num_clusters] [-p base_port] [--no-stop] ";exit 1 } #------------------------------------------- # Argument check -# usage: $0 [-m r|s] [-n num_clusters] [--no-stop]" +# usage: $0 [-m r|s] [-n num_clusters] [-p base_port] [--no-stop]" #------------------------------------------- # # default mode is streaming replication mode @@ -608,6 +612,9 @@ do elif [ $1 = "-n" ];then shift NUMCLUSTERS=$1 + elif [ $1 = "-p" ];then + shift + BASEPORT=$1 elif [ $1 = "--no-stop" ];then shift NO_STOP="true" [parent: 0fd460bdb51c]