summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaleb Tennis <caleb@gentoo.org>2009-01-28 22:26:31 +0000
committerCaleb Tennis <caleb@gentoo.org>2009-01-28 22:26:31 +0000
commit29f7d0f433041f1df058f6857ce4cd8afdd6dba4 (patch)
treeb12a8e5e8f8d5c3df66577fc3398f503a3d35a07 /dev-db/postgresql-server
parentInitial commit. Fixes bug 244925 (diff)
downloadgentoo-2-29f7d0f433041f1df058f6857ce4cd8afdd6dba4.tar.gz
gentoo-2-29f7d0f433041f1df058f6857ce4cd8afdd6dba4.tar.bz2
gentoo-2-29f7d0f433041f1df058f6857ce4cd8afdd6dba4.zip
Update init and con scripts for 8.2 to match the changes from 8.3
(Portage version: 2.2_rc23/cvs/Linux i686)
Diffstat (limited to 'dev-db/postgresql-server')
-rw-r--r--dev-db/postgresql-server/ChangeLog8
-rw-r--r--dev-db/postgresql-server/files/postgresql.conf-8.24
-rw-r--r--dev-db/postgresql-server/files/postgresql.init-8.222
3 files changed, 23 insertions, 11 deletions
diff --git a/dev-db/postgresql-server/ChangeLog b/dev-db/postgresql-server/ChangeLog
index 3761e9858a69..a5c5c608cc71 100644
--- a/dev-db/postgresql-server/ChangeLog
+++ b/dev-db/postgresql-server/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-db/postgresql-server
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/ChangeLog,v 1.15 2008/12/03 19:27:06 caleb Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/ChangeLog,v 1.16 2009/01/28 22:26:31 caleb Exp $
+
+ 28 Jan 2009; Caleb Tennis <caleb@gentoo.org> files/postgresql.conf-8.2,
+ files/postgresql.init-8.2:
+ Update init and conf scripts for 8.2 to match the changes from 8.3
*postgresql-server-8.2.11 (03 Dec 2008)
diff --git a/dev-db/postgresql-server/files/postgresql.conf-8.2 b/dev-db/postgresql-server/files/postgresql.conf-8.2
index 2cf92587cdbb..2719fb8072f9 100644
--- a/dev-db/postgresql-server/files/postgresql.conf-8.2
+++ b/dev-db/postgresql-server/files/postgresql.conf-8.2
@@ -40,6 +40,10 @@ WAIT_FOR_CLEANUP=60
# Set to 0 to deactivate it
WAIT_FOR_QUIT=60
+# Comment this out if you don't want to wait for the server to
+# startup before continuing. For example, if this server is a
+# PITR log shipping based replication standby
+WAIT_FOR_START="-w"
# If you have to export environment variables for the database process,
# this can be done here.
diff --git a/dev-db/postgresql-server/files/postgresql.init-8.2 b/dev-db/postgresql-server/files/postgresql.init-8.2
index fea496e5e412..9fa6c34a4f4e 100644
--- a/dev-db/postgresql-server/files/postgresql.init-8.2
+++ b/dev-db/postgresql-server/files/postgresql.init-8.2
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/files/postgresql.init-8.2,v 1.3 2008/05/13 07:00:36 dev-zero Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/files/postgresql.init-8.2,v 1.4 2009/01/28 22:26:30 caleb Exp $
opts="${opts} reload"
@@ -34,7 +34,7 @@ start() {
local retval
su -l ${PGUSER} \
- -c "env PGDATA=\"${PGDATA}\" /usr/lib/postgresql-8.2/bin/pg_ctl start -w -o '--silent-mode=true ${PGOPTS}'"
+ -c "env PGDATA=\"${PGDATA}\" /usr/lib/postgresql-8.2/bin/pg_ctl start ${WAIT_FOR_START} -o '--silent-mode=true ${PGOPTS}'"
retval=$?
[ $retval -ne 0 ] && eend $retval && return $retval
@@ -58,16 +58,18 @@ stop() {
local retval
- start-stop-daemon --stop --pidfile "${PGDATA}/postmaster.pid" \
- --retry -TERM/${WAIT_FOR_DISCONNECT}
+ su -l ${PGUSER} \
+ -c "env PGDATA=\"${PGDATA}\" /usr/lib/postgresql-8.2/bin/pg_ctl stop -t ${WAIT_FOR_DISCONNECT} -m smart"
+
retval=$?
[ $retval -eq 0 ] && eend $retval && return $retval
ewarn "Some clients did not disconnect within ${WAIT_FOR_DISCONNECT} seconds."
ewarn "Going to shutdown the server anyway."
- start-stop-daemon --stop --pidfile "${PGDATA}/postmaster.pid" \
- --retry -INT/${WAIT_FOR_CLEANUP}
+ su -l ${PGUSER} \
+ -c "env PGDATA=\"${PGDATA}\" /usr/lib/postgresql-8.2/bin/pg_ctl stop -m fast"
+
retval=$?
[ $retval -eq 0 ] && eend $retval && return $retval
@@ -80,8 +82,9 @@ stop() {
ewarn "Shutting down the server gracefully failed."
ewarn "Forcing it to shutdown which leads to a recover-run on next startup."
- start-stop-daemon --stop --pidfile "${PGDATA}/postmaster.pid" \
- --retry -QUIT/${WAIT_FOR_QUIT}
+ su -l ${PGUSER} \
+ -c "env PGDATA=\"${PGDATA}\" /usr/lib/postgresql-8.2/bin/pg_ctl stop -m immediate"
+
retval=$?
[ $retval -eq 0 ] && eend $retval && return $retval
@@ -91,6 +94,7 @@ stop() {
reload() {
ebegin "Reloading PostgreSQL configuration"
- start-stop-daemon --stop --pidfile "${PGDATA}/postmaster.pid" --signal HUP --oknodo
+ su -l ${PGUSER} \
+ -c "env PGDATA=\"${PGDATA}\" /usr/lib/postgresql-8.2/bin/pg_ctl reload"
eend $?
}