diff options
Diffstat (limited to 'databases/pgpool-II-23/files')
-rw-r--r-- | databases/pgpool-II-23/files/patch-recovery.c | 19 | ||||
-rw-r--r-- | databases/pgpool-II-23/files/pgpool.in | 53 | ||||
-rw-r--r-- | databases/pgpool-II-23/files/pgpool_copy_backup | 40 | ||||
-rw-r--r-- | databases/pgpool-II-23/files/pgpool_remote_start | 26 | ||||
-rw-r--r-- | databases/pgpool-II-23/files/pgpool_switch_xlog | 20 |
5 files changed, 0 insertions, 158 deletions
diff --git a/databases/pgpool-II-23/files/patch-recovery.c b/databases/pgpool-II-23/files/patch-recovery.c deleted file mode 100644 index a6ac0c6bceca..000000000000 --- a/databases/pgpool-II-23/files/patch-recovery.c +++ /dev/null @@ -1,19 +0,0 @@ ---- recovery.c.orig 2009-08-14 15:15:08.000000000 +0900 -+++ recovery.c 2009-08-14 18:00:38.000000000 +0900 -@@ -91,7 +91,7 @@ - - pool_log("1st stage is done"); - -- pool_log("starting 2nd stage"); -+ pool_log("starting 2nd stage. waiting connections from clients to be closed"); - - /* 2nd stage */ - *InRecovery = 1; -@@ -332,6 +332,6 @@ - sleep(3); - } while (i++ < WAIT_RETRY_COUNT); - -- pool_error("wait_connection_closed: existing connections did not close in %d sec.", pool_config->recovery_timeout); -+ pool_error("wait_connection_closed: existing connections (%d) did not close in %d sec.", Req_info->conn_counter, pool_config->recovery_timeout); - return 1; - } diff --git a/databases/pgpool-II-23/files/pgpool.in b/databases/pgpool-II-23/files/pgpool.in deleted file mode 100644 index 6566ef9fa3be..000000000000 --- a/databases/pgpool-II-23/files/pgpool.in +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# PROVIDE: pgpool -# REQUIRE: LOGIN -# KEYWORD: shutdown -# -# Add the following lines to /etc/rc.conf.local or /etc/rc.conf -# to enable this service: -# -# pgpool_enable (bool): Set to NO by default. -# Set it to YES to enable pgpool. -# pgpool_conf (file): Set location of your config. -# Default is "%%PREFIX%%/etc/pgpool.conf" -# pgpool_flags (string): Default is "-f $pgpool_conf" -# pgpool_looger (bool): Use logger for logging. -# pgpool_looger_pri (string): logger priority (default "local0.info"). -# pgpool_user (uid): User ID to run as (default nobody) -# - -. /etc/rc.subr - -name=pgpool -rcvar=${name}_enable - -load_rc_config $name - -: ${pgpool_enable="NO"} -: ${pgpool_conf="%%PREFIX%%/etc/pgpool.conf"} -: ${pgpool_flags="-f ${pgpool_conf}"} -: ${pgpool_user="nobody"} -: ${pgpool_logger="YES"} -: ${pgpool_logger_pri="local0.info"} - -command="%%PREFIX%%/bin/pgpool" -command_args="${pgpool_flags}" -start_cmd="pgpool_start" -stop_cmd="${command} ${command_args} stop" - -required_files="${pgpool_conf}" - -pgpool_start() -{ - if checkyesno pgpool_logger; then - su -m $pgpool_user -c "sh -c \"$command $command_args -n 2>&1 | logger -t $name -p $pgpool_logger_pri &\"" - else - unset start_cmd - run_rc_command start - fi -} - -run_rc_command "$1" diff --git a/databases/pgpool-II-23/files/pgpool_copy_backup b/databases/pgpool-II-23/files/pgpool_copy_backup deleted file mode 100644 index aa6a5226d53a..000000000000 --- a/databases/pgpool-II-23/files/pgpool_copy_backup +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# In postgresql.conf: -# archive_command = 'test -f /proj/pgsql/data/archive_log/%f || cp %p /proj/pgsql/data/archive_log/%f' -# - -SRC=pgsql@$(hostname) -SRCDIR=$1 -DEST=pgsql@$2 -DESTDIR=$3 -ARCLOG=$1/archive_log - -logger="logger -t pgpool -p local0.info" -rsync="/usr/local/bin/rsync -av --delete --checksum" -excl="--exclude=pg_log --exclude=postmaster.pid" -psql="/usr/local/bin/psql" - -/bin/sh <<EOF | ${logger} 2>&1 - -$psql -c "select pg_start_backup('pgpool-recovery')" template1 - -ssh $DEST " -/usr/local/bin/pg_ctl -D $DESTDIR -s -m fast stop; -rm -f $DESTDIR/backup_label" - -echo "restore_command = 'scp $SRC:$ARCLOG/%f %p'" > $SRCDIR/recovery.conf - -$rsync $SRCDIR/ $excl $DEST:/$DESTDIR/ - -ssh $DEST " -mkdir -p $DESTDIR/pg_xlog/archive_status; -mkdir -p $DESTDIR/pg_log" - -rm -f $SRCDIR/recovery.conf - -$psql -c 'select pg_stop_backup()' template1 - -EOF diff --git a/databases/pgpool-II-23/files/pgpool_remote_start b/databases/pgpool-II-23/files/pgpool_remote_start deleted file mode 100644 index 1c044aef90cb..000000000000 --- a/databases/pgpool-II-23/files/pgpool_remote_start +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/perl -# -# $FreeBSD$ - -use strict; -use warnings; - -my ($host, $dir) = @ARGV; - -my $logger = "logger -t pgpool -p local0.info"; -my $pgctl = "/usr/local/bin/pg_ctl -D $dir"; -my ($fh, $log); - -if (not open($fh, "ssh pgsql\@$host $pgctl -t 5 -w -s -m fast start 2>&1 |")) { - die "cannot open ssh: $!"; -} -if (not open($log, "| $logger")) { - die "cannot open logger: $!"; -} -while (<$fh>) { - print $log $_; -} -close($fh) or die "close(ssh) failed: $!"; -close($log) or die "close(logger): $!"; - -system("ssh pgsql\@$host $pgctl status 2>&1") == 0 or die "pg_ctl status failed"; diff --git a/databases/pgpool-II-23/files/pgpool_switch_xlog b/databases/pgpool-II-23/files/pgpool_switch_xlog deleted file mode 100644 index 8ce8b8603a46..000000000000 --- a/databases/pgpool-II-23/files/pgpool_switch_xlog +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ - -logger="logger -t pgpool -p local0.info" -psql=/usr/local/bin/psql - -/bin/sh <<EOF | ${logger} 2>&1 - -$psql -t -c 'SELECT datname FROM pg_database WHERE NOT datistemplate AND datallowconn' template1 | -while read i -do - if [ "$i" != "" ];then - $psql -c "SELECT setval(oid, nextval(oid)) FROM pg_class WHERE relkind = 'S'" $i - fi -done - -$psql -c 'select pg_switch_xlog()' template1 - -EOF |