PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
enable_rpath_FALSE
enable_rpath_TRUE
MEMCACHED_DIR
+PGSQL_BIN_DIR
PGSQL_LIB_DIR
PGSQL_INCLUDE_DIR
MEMCACHED_RPATH_OPT
with_pgsql
with_pgsql_includedir
with_pgsql_libdir
+with_pgsql_bindir
with_openssl
with_pam
with_memcached
--with-pgsql=DIR site header files for PostgreSQL in DIR
--with-pgsql-includedir=DIR site header files for PostgreSQL in DIR
--with-pgsql-libdir=DIR site library files for PostgreSQL in DIR
+ --with-pgsql-bindir=DIR site executable files for PostgreSQL in DIR
--with-openssl build with OpenSSL support
--with-pam build with PAM support
--with-memcached=DIR site header files for libmemcached in DIR
then
PGSQL_INCLUDE_DIR=/usr/local/pgsql/include
PGSQL_LIB_DIR=/usr/local/pgsql/lib
+ PGSQL_BIN_DIR=/usr/local/pgsql/bin
else
PGSQL_INCLUDE_DIR=`pg_config --includedir`
PGSQL_LIB_DIR=`pg_config --libdir`
+ PGSQL_BIN_DIR=`pg_config --bindir`
fi
esac
PGSQL_INCLUDE_DIR="$withval"/include
PGSQL_LIB_DIR="$withval"/lib
+ PGSQL_BIN_DIR="$withval"/bin
fi
+# Check whether --with-pgsql-bindir was given.
+if test "${with_pgsql_bindir+set}" = set; then :
+ withval=$with_pgsql_bindir;
+ case "$withval" in
+ "" | y | ye | yes | n | no)
+ as_fn_error $? "*** You must supply an argument to the --with-pgsql-bindir option." "$LINENO" 5
+ ;;
+ esac
+ PGSQL_BIN_DIR="$withval"
+
+fi
+
+
# Check whether --with-openssl was given.
if test "${with_openssl+set}" = set; then :
+
# --enable(disable)-rpath option
# Check whether --enable-rpath was given.
if test "${enable_rpath+set}" = set; then :
then
PGSQL_INCLUDE_DIR=/usr/local/pgsql/include
PGSQL_LIB_DIR=/usr/local/pgsql/lib
+ PGSQL_BIN_DIR=/usr/local/pgsql/bin
else
PGSQL_INCLUDE_DIR=`pg_config --includedir`
PGSQL_LIB_DIR=`pg_config --libdir`
+ PGSQL_BIN_DIR=`pg_config --bindir`
fi
AC_ARG_WITH(pgsql,
esac
PGSQL_INCLUDE_DIR="$withval"/include
PGSQL_LIB_DIR="$withval"/lib
+ PGSQL_BIN_DIR="$withval"/bin
])
AC_ARG_WITH(pgsql-includedir,
PGSQL_LIB_DIR="$withval"
])
+AC_ARG_WITH(pgsql-bindir,
+ [ --with-pgsql-bindir=DIR site executable files for PostgreSQL in DIR],
+ [
+ case "$withval" in
+ "" | y | ye | yes | n | no)
+ AC_MSG_ERROR([*** You must supply an argument to the --with-pgsql-bindir option.])
+ ;;
+ esac
+ PGSQL_BIN_DIR="$withval"
+ ])
AC_ARG_WITH(openssl,
[ --with-openssl build with OpenSSL support],
AC_SUBST(PGSQL_INCLUDE_DIR)
AC_SUBST(PGSQL_LIB_DIR)
+AC_SUBST(PGSQL_BIN_DIR)
AC_SUBST(MEMCACHED_DIR)
# --enable(disable)-rpath option
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
test/pdo-test/pdotest.php test/pdo-test/regsql.inc \
test/pdo-test/SQLlist/test1.sql test/pdo-test/SQLlist/test2.sql \
test/pdo-test/mod/database.inc test/pdo-test/mod/errorhandler.inc \
- test/pgpool_setup test/watchdog_setup test/regression \
+ test/pgpool_setup.in test/watchdog_setup.in test/regression \
redhat/pgpool.init \
redhat/pgpool_rhel.sysconfig redhat/pgpool_rhel6.sysconfig \
redhat/pgpool.conf.sample.patch \
redhat/pgpool.service \
pgpool.spec
+bin_SCRIPTS = test/pgpool_setup test/watchdog_setup
+
+%: %.in
+ sed -e 's#[@][@]PGPOOL_INSTALL_DIR[@][@]#$(prefix)#g' \
+ -e 's#[@][@]PGPOOL_CONFIG_DIR[@][@]#$(sysconfdir)#g' \
+ -e 's#[@][@]PGSQL_BIN_DIR[@][@]#$(PGSQL_BIN_DIR)#g' \
+ -e 's#[@][@]PGSQL_LIB_DIR[@][@]#$(PGSQL_LIB_DIR)#g' $^ > $@
+ chmod +x $@
+
+clean-local:
+ -rm -f test/pgpool_setup test/watchdog_setup
+
SUBDIRS = parser libs watchdog . tools include
@SET_MAKE@
+
VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" \
- "$(DESTDIR)$(sysconfdir)"
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
+ "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(sysconfdir)"
PROGRAMS = $(bin_PROGRAMS)
am__dirstamp = $(am__leading_dot)dirstamp
am_pgpool_OBJECTS = main/main.$(OBJEXT) main/pool_globals.$(OBJEXT) \
pgpool_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(pgpool_LDFLAGS) $(LDFLAGS) -o $@
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+SCRIPTS = $(bin_SCRIPTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
- for p in $$list; do echo "$$p $$p"; done | \
- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
- if (++n[$$2] == $(am__install_max)) \
- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
- END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
- }
DATA = $(pkgdata_DATA) $(sysconf_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
test/pdo-test/pdotest.php test/pdo-test/regsql.inc \
test/pdo-test/SQLlist/test1.sql test/pdo-test/SQLlist/test2.sql \
test/pdo-test/mod/database.inc test/pdo-test/mod/errorhandler.inc \
- test/pgpool_setup test/watchdog_setup test/regression \
+ test/pgpool_setup.in test/watchdog_setup.in test/regression \
redhat/pgpool.init \
redhat/pgpool_rhel.sysconfig redhat/pgpool_rhel6.sysconfig \
redhat/pgpool.conf.sample.patch \
redhat/pgpool.service \
pgpool.spec
+bin_SCRIPTS = test/pgpool_setup test/watchdog_setup
SUBDIRS = parser libs watchdog . tools include
all: all-recursive
pgpool$(EXEEXT): $(pgpool_OBJECTS) $(pgpool_DEPENDENCIES) $(EXTRA_pgpool_DEPENDENCIES)
@rm -f pgpool$(EXEEXT)
$(AM_V_CCLD)$(pgpool_LINK) $(pgpool_OBJECTS) $(pgpool_LDADD) $(LIBS)
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
done
check-am: all-am
check: check-recursive
-all-am: Makefile $(PROGRAMS) $(DATA)
+all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA)
installdirs: installdirs-recursive
installdirs-am:
- for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(sysconfdir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(sysconfdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
-rm -f config/pool_config.c
clean: clean-recursive
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+clean-am: clean-binPROGRAMS clean-generic clean-libtool clean-local \
+ mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
install-dvi-am:
-install-exec-am: install-binPROGRAMS install-sysconfDATA
+install-exec-am: install-binPROGRAMS install-binSCRIPTS \
+ install-sysconfDATA
install-html: install-html-recursive
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-pkgdataDATA \
- uninstall-sysconfDATA
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
+ uninstall-pkgdataDATA uninstall-sysconfDATA
.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
check-am clean clean-binPROGRAMS clean-generic clean-libtool \
- cscopelist-am ctags ctags-am distclean distclean-compile \
- distclean-generic distclean-libtool distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-binPROGRAMS install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-pkgdataDATA install-ps \
- install-ps-am install-strip install-sysconfDATA installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
+ clean-local cscopelist-am ctags ctags-am distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binPROGRAMS install-binSCRIPTS \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-pkgdataDATA install-ps install-ps-am \
+ install-strip install-sysconfDATA installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-pkgdataDATA uninstall-sysconfDATA
+ uninstall-binSCRIPTS uninstall-pkgdataDATA \
+ uninstall-sysconfDATA
+
+
+%: %.in
+ sed -e 's#[@][@]PGPOOL_INSTALL_DIR[@][@]#$(prefix)#g' \
+ -e 's#[@][@]PGPOOL_CONFIG_DIR[@][@]#$(sysconfdir)#g' \
+ -e 's#[@][@]PGSQL_BIN_DIR[@][@]#$(PGSQL_BIN_DIR)#g' \
+ -e 's#[@][@]PGSQL_LIB_DIR[@][@]#$(PGSQL_LIB_DIR)#g' $^ > $@
+ chmod +x $@
+clean-local:
+ -rm -f test/pgpool_setup test/watchdog_setup
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
# Default number of PostgreSQL database clusters
NUMCLUSTERS=${NUMCLUSTERS:-"2"}
# Where to look for pgpool.conf.sample*
-PGPOOL_INSTALL_DIR=${PGPOOL_INSTALL_DIR:-"/usr/local"}
-PGPOOLDIR=${PGPOOLDIR:-${PGPOOL_INSTALL_DIR}/etc}
+PGPOOL_INSTALL_DIR=${PGPOOL_INSTALL_DIR:-"@@PGPOOL_INSTALL_DIR@@"}
+PGPOOLDIR=${PGPOOLDIR:-"@@PGPOOL_CONFIG_DIR@@"}
# PostgreSQL commands(initdb, pg_ctl, psql) install dir
-PGBIN=${PGBIN:-"/usr/local/pgsql/bin"}
+PGBIN=${PGBIN:-"@@PGSQL_BIN_DIR@@"}
# LD_LIBRARY_PATH
-LPATH=${PGLIB:-"/usr/local/pgsql/lib"}
+LPATH=${PGLIB:-"@@PGSQL_LIB_DIR@@"}
# unix socket directory
PGSOCKET_DIR=${PGSOCKET_DIR:-"/tmp"}
# initdb args
# pgpool reload script name. This will be generated in this script.
PGPOOL_RELOAD=$BASEDIR/pgpool_reload
+export PGHOST=$PGSOCKET_DIR
+
#-------------------------------------------
# create failover script
#-------------------------------------------
log=$DATADIR_BASE/log/recovery.log
touch standby.signal
+EOF
+
+echo "export PGHOST=$PGSOCKET_DIR" >> $1/$SCRIPT
+cat >> $1/$SCRIPT <<'EOF'
$psql -p $PORT -c "SELECT pg_start_backup('Streaming Replication', true)" postgres
echo "source: $master_db_cluster dest: $DEST_CLUSTER" > $log
if [ $PGVERSION -ge 120 ];then
cat >> $1/$SCRIPT <<'EOF'
cat > $DEST_CLUSTER/myrecovery.conf <<REOF
-primary_conninfo = 'port=$PORT user=$PGSUPERUSER'
+primary_conninfo = 'host=localhost port=$PORT user=$PGSUPERUSER'
recovery_target_timeline='latest'
restore_command = 'cp $DATADIR_BASE/archivedir/%f "%p" 2> /dev/null'
REOF
cat >> $1/$SCRIPT <<'EOF'
cat > $DEST_CLUSTER/recovery.conf <<REOF
standby_mode = 'on'
-primary_conninfo = 'port=$PORT user=$PGSUPERUSER'
+primary_conninfo = 'host=localhost port=$PORT user=$PGSUPERUSER'
recovery_target_timeline='latest'
restore_command = 'cp $DATADIR_BASE/archivedir/%f "%p" 2> /dev/null'
REOF
psql=__PGBIN__/psql
DATADIR_BASE=__DATADIR_BASE__
PGSUPERUSER=__PGSUPERUSER__
+EOF
+echo "export PGHOST=$PGSOCKET_DIR" >> $1/$SCRIPT
+
+cat >> $1/$SCRIPT <<'EOF'
master_db_cluster=$1
recovery_node_host_name=$2
DEST_CLUSTER=$3
PORT=$4
log=$DATADIR_BASE/log/recovery.log
+EOF
+echo "export PGHOST=$PGSOCKET_DIR" >> $1/$SCRIPT
+
+cat >> $1/$SCRIPT <<'EOF'
# Force to flush current value of sequences to xlog
$psql -q -p $PORT -t -c 'SELECT datname FROM pg_database WHERE NOT datistemplate AND datallowconn' template1|
while read i
fi
cat > $1/$fname <<EOF
-primary_conninfo = 'port=$BASEPORT user=$WHOAMI'
+primary_conninfo = 'host=localhost port=$BASEPORT user=$WHOAMI'
recovery_target_timeline='latest'
restore_command = 'cp $BASEDIR/archivedir/%f "%p" 2> /dev/null'
EOF
BASEDIR=`pwd`
# location of pgpool_setup
-PGPOOL_SETUP=${PGPOOL_SETUP:-"pgpool_setup"}
+PGPOOL_SETUP=${PGPOOL_SETUP:-"$(dirname $0)/pgpool_setup"}
# PostgreSQL bin directory
+PGBIN=${PGBIN:-"@@PGSQL_BIN_DIR@@"}
INITDB=$PGBIN/initdb
PG_CTL=$PGBIN/pg_ctl
PSQL=$PGBIN/psql
SUBDIRS = pcp pgmd5
-dist_bin_SCRIPTS = pgpool_setup watchdog_setup
+bin_SCRIPTS = pgpool_setup watchdog_setup
pgpool_setup:
ln -s ../test/pgpool_setup .
ln -s ../test/watchdog_setup .
clean-local:
- -rm -f $(dist_bin_SCRIPTS)
+ -rm -f $(bin_SCRIPTS)
host_triplet = @host@
subdir = src/tools
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/mkinstalldirs $(dist_bin_SCRIPTS)
+ $(top_srcdir)/mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/docbook.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(bindir)"
-SCRIPTS = $(dist_bin_SCRIPTS)
+SCRIPTS = $(bin_SCRIPTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = pcp pgmd5
-dist_bin_SCRIPTS = pgpool_setup watchdog_setup
+bin_SCRIPTS = pgpool_setup watchdog_setup
all: all-recursive
.SUFFIXES:
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
-install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
+install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
- @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
} \
; done
-uninstall-dist_binSCRIPTS:
+uninstall-binSCRIPTS:
@$(NORMAL_UNINSTALL)
- @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 's,.*/,,;$(transform)'`; \
dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
install-dvi-am:
-install-exec-am: install-dist_binSCRIPTS
+install-exec-am: install-binSCRIPTS
install-html: install-html-recursive
ps-am:
-uninstall-am: uninstall-dist_binSCRIPTS
+uninstall-am: uninstall-binSCRIPTS
.MAKE: $(am__recursive_targets) install-am install-strip
check-am clean clean-generic clean-libtool clean-local \
cscopelist-am ctags ctags-am distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dist_binSCRIPTS install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
- ps ps-am tags tags-am uninstall uninstall-am \
- uninstall-dist_binSCRIPTS
+ html-am info info-am install install-am install-binSCRIPTS \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am uninstall-binSCRIPTS
pgpool_setup:
ln -s ../test/watchdog_setup .
clean-local:
- -rm -f $(dist_bin_SCRIPTS)
+ -rm -f $(bin_SCRIPTS)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL = @PERL@
PGCONFIG = @PGCONFIG@
+PGSQL_BIN_DIR = @PGSQL_BIN_DIR@
PGSQL_INCLUDE_DIR = @PGSQL_INCLUDE_DIR@
PGSQL_LIB_DIR = @PGSQL_LIB_DIR@
RANLIB = @RANLIB@