aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2010-02-22 19:20:13 +0800
committerkuriyama <kuriyama@FreeBSD.org>2010-02-22 19:20:13 +0800
commita48c505ef77d1c11e33b425b8c182f3ad24096c8 (patch)
tree65727d56fc7301deec812d6dd4a38a6a3c0a499c
parent4199252a122d76fc48b9c719730a1d51dfcf827f (diff)
downloadfreebsd-ports-gnome-a48c505ef77d1c11e33b425b8c182f3ad24096c8.tar.gz
freebsd-ports-gnome-a48c505ef77d1c11e33b425b8c182f3ad24096c8.tar.zst
freebsd-ports-gnome-a48c505ef77d1c11e33b425b8c182f3ad24096c8.zip
- Upgrade to 2.3.2.2.
- Improve error handling of recovery script. Feature safe: yes
-rw-r--r--databases/pgpool-II-23/Makefile4
-rw-r--r--databases/pgpool-II-23/distinfo6
-rw-r--r--databases/pgpool-II-23/files/pgpool_copy_backup11
-rw-r--r--databases/pgpool-II-23/files/pgpool_remote_start25
-rw-r--r--databases/pgpool-II-30/Makefile4
-rw-r--r--databases/pgpool-II-30/distinfo6
-rw-r--r--databases/pgpool-II-30/files/pgpool_copy_backup11
-rw-r--r--databases/pgpool-II-30/files/pgpool_remote_start25
-rw-r--r--databases/pgpool-II/Makefile4
-rw-r--r--databases/pgpool-II/distinfo6
-rw-r--r--databases/pgpool-II/files/pgpool_copy_backup11
-rw-r--r--databases/pgpool-II/files/pgpool_remote_start25
12 files changed, 93 insertions, 45 deletions
diff --git a/databases/pgpool-II-23/Makefile b/databases/pgpool-II-23/Makefile
index 7f8221897905..c23f369afe2b 100644
--- a/databases/pgpool-II-23/Makefile
+++ b/databases/pgpool-II-23/Makefile
@@ -6,9 +6,9 @@
#
PORTNAME= pgpool-II
-PORTVERSION= 2.3.2.1
+PORTVERSION= 2.3.2.2
CATEGORIES= databases
-MASTER_SITES= http://pgfoundry.org/frs/download.php/2566/
+MASTER_SITES= http://pgfoundry.org/frs/download.php/2572/
MAINTAINER= kuriyama@FreeBSD.org
COMMENT= A connection pool server for PostgreSQL
diff --git a/databases/pgpool-II-23/distinfo b/databases/pgpool-II-23/distinfo
index 10925d741aba..0708ea248753 100644
--- a/databases/pgpool-II-23/distinfo
+++ b/databases/pgpool-II-23/distinfo
@@ -1,3 +1,3 @@
-MD5 (pgpool-II-2.3.2.1.tar.gz) = 3e12794ea24b8d2655ee8744ef054d97
-SHA256 (pgpool-II-2.3.2.1.tar.gz) = 454b95dc3183ceb52794688c28d3a3d043ad76019bbe98346a362558f07de363
-SIZE (pgpool-II-2.3.2.1.tar.gz) = 1149252
+MD5 (pgpool-II-2.3.2.2.tar.gz) = e362a8c125e4638345ef1bd67708f2a8
+SHA256 (pgpool-II-2.3.2.2.tar.gz) = 45cefbbda7499b61bf3485e2b86e96aba174d49effc043a7c2e588e4b5fe7e0c
+SIZE (pgpool-II-2.3.2.2.tar.gz) = 1149899
diff --git a/databases/pgpool-II-23/files/pgpool_copy_backup b/databases/pgpool-II-23/files/pgpool_copy_backup
index 31d0d4651921..aa6a5226d53a 100644
--- a/databases/pgpool-II-23/files/pgpool_copy_backup
+++ b/databases/pgpool-II-23/files/pgpool_copy_backup
@@ -1,6 +1,10 @@
#!/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
@@ -10,16 +14,15 @@ ARCLOG=$1/archive_log
logger="logger -t pgpool -p local0.info"
rsync="/usr/local/bin/rsync -av --delete --checksum"
-excl="--exclude=pg_log --exclude=archive_log --exclude=postmaster.pid"
-psql=/usr/local/bin/psql
+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/etc/rc.d/postgresql stop;
-rm -rf $DESTDIR/pg_xlog;
+/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
diff --git a/databases/pgpool-II-23/files/pgpool_remote_start b/databases/pgpool-II-23/files/pgpool_remote_start
index 66a628b725fd..1c044aef90cb 100644
--- a/databases/pgpool-II-23/files/pgpool_remote_start
+++ b/databases/pgpool-II-23/files/pgpool_remote_start
@@ -1,13 +1,26 @@
-#!/bin/sh
+#!/usr/bin/perl
#
# $FreeBSD$
-DEST=pgsql@$1
+use strict;
+use warnings;
-logger="logger -t pgpool -p local0.info"
+my ($host, $dir) = @ARGV;
-/bin/sh <<EOF | ${logger} 2>&1
+my $logger = "logger -t pgpool -p local0.info";
+my $pgctl = "/usr/local/bin/pg_ctl -D $dir";
+my ($fh, $log);
-ssh $DEST '/usr/local/etc/rc.d/postgresql start'
+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): $!";
-EOF
+system("ssh pgsql\@$host $pgctl status 2>&1") == 0 or die "pg_ctl status failed";
diff --git a/databases/pgpool-II-30/Makefile b/databases/pgpool-II-30/Makefile
index 7f8221897905..c23f369afe2b 100644
--- a/databases/pgpool-II-30/Makefile
+++ b/databases/pgpool-II-30/Makefile
@@ -6,9 +6,9 @@
#
PORTNAME= pgpool-II
-PORTVERSION= 2.3.2.1
+PORTVERSION= 2.3.2.2
CATEGORIES= databases
-MASTER_SITES= http://pgfoundry.org/frs/download.php/2566/
+MASTER_SITES= http://pgfoundry.org/frs/download.php/2572/
MAINTAINER= kuriyama@FreeBSD.org
COMMENT= A connection pool server for PostgreSQL
diff --git a/databases/pgpool-II-30/distinfo b/databases/pgpool-II-30/distinfo
index 10925d741aba..0708ea248753 100644
--- a/databases/pgpool-II-30/distinfo
+++ b/databases/pgpool-II-30/distinfo
@@ -1,3 +1,3 @@
-MD5 (pgpool-II-2.3.2.1.tar.gz) = 3e12794ea24b8d2655ee8744ef054d97
-SHA256 (pgpool-II-2.3.2.1.tar.gz) = 454b95dc3183ceb52794688c28d3a3d043ad76019bbe98346a362558f07de363
-SIZE (pgpool-II-2.3.2.1.tar.gz) = 1149252
+MD5 (pgpool-II-2.3.2.2.tar.gz) = e362a8c125e4638345ef1bd67708f2a8
+SHA256 (pgpool-II-2.3.2.2.tar.gz) = 45cefbbda7499b61bf3485e2b86e96aba174d49effc043a7c2e588e4b5fe7e0c
+SIZE (pgpool-II-2.3.2.2.tar.gz) = 1149899
diff --git a/databases/pgpool-II-30/files/pgpool_copy_backup b/databases/pgpool-II-30/files/pgpool_copy_backup
index 31d0d4651921..aa6a5226d53a 100644
--- a/databases/pgpool-II-30/files/pgpool_copy_backup
+++ b/databases/pgpool-II-30/files/pgpool_copy_backup
@@ -1,6 +1,10 @@
#!/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
@@ -10,16 +14,15 @@ ARCLOG=$1/archive_log
logger="logger -t pgpool -p local0.info"
rsync="/usr/local/bin/rsync -av --delete --checksum"
-excl="--exclude=pg_log --exclude=archive_log --exclude=postmaster.pid"
-psql=/usr/local/bin/psql
+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/etc/rc.d/postgresql stop;
-rm -rf $DESTDIR/pg_xlog;
+/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
diff --git a/databases/pgpool-II-30/files/pgpool_remote_start b/databases/pgpool-II-30/files/pgpool_remote_start
index 66a628b725fd..1c044aef90cb 100644
--- a/databases/pgpool-II-30/files/pgpool_remote_start
+++ b/databases/pgpool-II-30/files/pgpool_remote_start
@@ -1,13 +1,26 @@
-#!/bin/sh
+#!/usr/bin/perl
#
# $FreeBSD$
-DEST=pgsql@$1
+use strict;
+use warnings;
-logger="logger -t pgpool -p local0.info"
+my ($host, $dir) = @ARGV;
-/bin/sh <<EOF | ${logger} 2>&1
+my $logger = "logger -t pgpool -p local0.info";
+my $pgctl = "/usr/local/bin/pg_ctl -D $dir";
+my ($fh, $log);
-ssh $DEST '/usr/local/etc/rc.d/postgresql start'
+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): $!";
-EOF
+system("ssh pgsql\@$host $pgctl status 2>&1") == 0 or die "pg_ctl status failed";
diff --git a/databases/pgpool-II/Makefile b/databases/pgpool-II/Makefile
index 7f8221897905..c23f369afe2b 100644
--- a/databases/pgpool-II/Makefile
+++ b/databases/pgpool-II/Makefile
@@ -6,9 +6,9 @@
#
PORTNAME= pgpool-II
-PORTVERSION= 2.3.2.1
+PORTVERSION= 2.3.2.2
CATEGORIES= databases
-MASTER_SITES= http://pgfoundry.org/frs/download.php/2566/
+MASTER_SITES= http://pgfoundry.org/frs/download.php/2572/
MAINTAINER= kuriyama@FreeBSD.org
COMMENT= A connection pool server for PostgreSQL
diff --git a/databases/pgpool-II/distinfo b/databases/pgpool-II/distinfo
index 10925d741aba..0708ea248753 100644
--- a/databases/pgpool-II/distinfo
+++ b/databases/pgpool-II/distinfo
@@ -1,3 +1,3 @@
-MD5 (pgpool-II-2.3.2.1.tar.gz) = 3e12794ea24b8d2655ee8744ef054d97
-SHA256 (pgpool-II-2.3.2.1.tar.gz) = 454b95dc3183ceb52794688c28d3a3d043ad76019bbe98346a362558f07de363
-SIZE (pgpool-II-2.3.2.1.tar.gz) = 1149252
+MD5 (pgpool-II-2.3.2.2.tar.gz) = e362a8c125e4638345ef1bd67708f2a8
+SHA256 (pgpool-II-2.3.2.2.tar.gz) = 45cefbbda7499b61bf3485e2b86e96aba174d49effc043a7c2e588e4b5fe7e0c
+SIZE (pgpool-II-2.3.2.2.tar.gz) = 1149899
diff --git a/databases/pgpool-II/files/pgpool_copy_backup b/databases/pgpool-II/files/pgpool_copy_backup
index 31d0d4651921..aa6a5226d53a 100644
--- a/databases/pgpool-II/files/pgpool_copy_backup
+++ b/databases/pgpool-II/files/pgpool_copy_backup
@@ -1,6 +1,10 @@
#!/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
@@ -10,16 +14,15 @@ ARCLOG=$1/archive_log
logger="logger -t pgpool -p local0.info"
rsync="/usr/local/bin/rsync -av --delete --checksum"
-excl="--exclude=pg_log --exclude=archive_log --exclude=postmaster.pid"
-psql=/usr/local/bin/psql
+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/etc/rc.d/postgresql stop;
-rm -rf $DESTDIR/pg_xlog;
+/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
diff --git a/databases/pgpool-II/files/pgpool_remote_start b/databases/pgpool-II/files/pgpool_remote_start
index 66a628b725fd..1c044aef90cb 100644
--- a/databases/pgpool-II/files/pgpool_remote_start
+++ b/databases/pgpool-II/files/pgpool_remote_start
@@ -1,13 +1,26 @@
-#!/bin/sh
+#!/usr/bin/perl
#
# $FreeBSD$
-DEST=pgsql@$1
+use strict;
+use warnings;
-logger="logger -t pgpool -p local0.info"
+my ($host, $dir) = @ARGV;
-/bin/sh <<EOF | ${logger} 2>&1
+my $logger = "logger -t pgpool -p local0.info";
+my $pgctl = "/usr/local/bin/pg_ctl -D $dir";
+my ($fh, $log);
-ssh $DEST '/usr/local/etc/rc.d/postgresql start'
+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): $!";
-EOF
+system("ssh pgsql\@$host $pgctl status 2>&1") == 0 or die "pg_ctl status failed";