pgpool 之七 pgpool_remote_start

Source
版权声明:本文为博主原创文章,转载请标明出处。 https://blog.csdn.net/ctypyb2002/article/details/87778072

pgpool_remote_start

$ vi /data/pg9.6/main/pgpool_remote_start

#! /bin/sh

if [ $# -ne 2 ]
then
    echo "pgpool_remote_start remote_host remote_datadir"
    exit 1
fi

DEST=$1
DESTDIR=$2
PGCTL=/usr/lib/postgresql/9.6/bin/pg_ctl

echo "`date +%Y-%m-%d\ %H:%M:%S,%3N` pgpool: FATAL: pgpool_remote_start /usr/bin/ssh -T $DEST $PGCTL -w -D $DESTDIR start"
/usr/bin/ssh -T $DEST $PGCTL -w -D $DESTDIR start 2>/dev/null 1>/dev/null < /dev/null &