diff options
author | Masatomo Nakano <nakano@gentoo.org> | 2005-05-10 06:40:37 +0000 |
---|---|---|
committer | Masatomo Nakano <nakano@gentoo.org> | 2005-05-10 06:40:37 +0000 |
commit | fce18fcae19f87ff2ffc6bb6f2a18611cfa314fe (patch) | |
tree | f05689e04d5758d37718d4272821dbb33bcd75e6 /dev-db/pgcluster/files | |
parent | mark ~ppc (diff) | |
download | gentoo-2-fce18fcae19f87ff2ffc6bb6f2a18611cfa314fe.tar.gz gentoo-2-fce18fcae19f87ff2ffc6bb6f2a18611cfa314fe.tar.bz2 gentoo-2-fce18fcae19f87ff2ffc6bb6f2a18611cfa314fe.zip |
version bump
(Portage version: 2.0.51.21-r1)
Diffstat (limited to 'dev-db/pgcluster/files')
-rw-r--r-- | dev-db/pgcluster/files/digest-pgcluster-1.3.0c | 1 | ||||
-rw-r--r-- | dev-db/pgcluster/files/pgcluster-1.3.0c-gentoo.patch | 42 | ||||
-rw-r--r-- | dev-db/pgcluster/files/pgcluster.conf-1.3.0c | 14 | ||||
-rw-r--r-- | dev-db/pgcluster/files/pgcluster.init-1.3.0c | 90 | ||||
-rw-r--r-- | dev-db/pgcluster/files/pglb.conf-1.3.0c | 2 | ||||
-rwxr-xr-x | dev-db/pgcluster/files/pglb.init-1.3.0c | 20 | ||||
-rw-r--r-- | dev-db/pgcluster/files/pgreplicate.conf-1.3.0c | 2 | ||||
-rwxr-xr-x | dev-db/pgcluster/files/pgreplicate.init-1.3.0c | 23 |
8 files changed, 194 insertions, 0 deletions
diff --git a/dev-db/pgcluster/files/digest-pgcluster-1.3.0c b/dev-db/pgcluster/files/digest-pgcluster-1.3.0c new file mode 100644 index 000000000000..8cd6c75fabb3 --- /dev/null +++ b/dev-db/pgcluster/files/digest-pgcluster-1.3.0c @@ -0,0 +1 @@ +MD5 359ea5e89218e0b255fb4e34b5cc599f pgcluster-1.3.0c.tar.gz 14104466 diff --git a/dev-db/pgcluster/files/pgcluster-1.3.0c-gentoo.patch b/dev-db/pgcluster/files/pgcluster-1.3.0c-gentoo.patch new file mode 100644 index 000000000000..e54375075029 --- /dev/null +++ b/dev-db/pgcluster/files/pgcluster-1.3.0c-gentoo.patch @@ -0,0 +1,42 @@ +diff -Naru pgcluster-1.3.0c.org/src/bin/initdb/initdb.c pgcluster-1.3.0c/src/bin/initdb/initdb.c +--- pgcluster-1.3.0c.org/src/bin/initdb/initdb.c 2004-11-29 03:05:03.000000000 +0000 ++++ pgcluster-1.3.0c/src/bin/initdb/initdb.c 2004-12-04 18:02:43.757485824 +0000 +@@ -2617,13 +2617,7 @@ + get_parent_directory(bin_dir); + + printf(_("\nSuccess. You can now start the database server using:\n\n" +- " %s%s%s%spostmaster -D %s%s%s\n" +- "or\n" +- " %s%s%s%spg_ctl -D %s%s%s -l logfile start\n\n"), +- QUOTE_PATH, bin_dir, QUOTE_PATH, (strlen(bin_dir) > 0) ? DIR_SEP : "", +- QUOTE_PATH, pg_data_native, QUOTE_PATH, +- QUOTE_PATH, bin_dir, QUOTE_PATH, (strlen(bin_dir) > 0) ? DIR_SEP : "", +- QUOTE_PATH, pg_data_native, QUOTE_PATH); ++ "/etc/init.d/pgcluster start\n\n")); + + return 0; + } +diff -Naru pgcluster-1.3.0c.org/src/pgcluster/pglb/Makefile pgcluster-1.3.0c/src/pgcluster/pglb/Makefile +--- pgcluster-1.3.0c.org/src/pgcluster/pglb/Makefile 2005-02-17 22:59:50.000000000 +0000 ++++ pgcluster-1.3.0c/src/pgcluster/pglb/Makefile 2005-02-21 06:58:22.184685524 +0000 +@@ -8,7 +8,7 @@ + top_builddir = ../../.. + include $(top_builddir)/src/Makefile.global + +-confdir := ${exec_prefix}/etc ++confdir := /etc/pgcluster + + OBJS= child.o cluster_table.o load_balance.o main.o pool_auth.o \ + pool_connection_pool.o pool_process_query.o pool_stream.o \ +diff -Naru pgcluster-1.3.0c.org/src/pgcluster/pgrp/Makefile pgcluster-1.3.0c/src/pgcluster/pgrp/Makefile +--- pgcluster-1.3.0c.org/src/pgcluster/pgrp/Makefile 2005-02-17 22:59:49.000000000 +0000 ++++ pgcluster-1.3.0c/src/pgcluster/pgrp/Makefile 2005-02-21 05:46:56.000000000 +0000 +@@ -8,7 +8,7 @@ + top_builddir = ../../.. + include $(top_builddir)/src/Makefile.global + +-confdir := ${exec_prefix}/etc ++confdir := /etc/pgcluster + + OBJS= cascade.o conf.o main.o recovery.o replicate.o rlog.o + diff --git a/dev-db/pgcluster/files/pgcluster.conf-1.3.0c b/dev-db/pgcluster/files/pgcluster.conf-1.3.0c new file mode 100644 index 000000000000..247c8ab87220 --- /dev/null +++ b/dev-db/pgcluster/files/pgcluster.conf-1.3.0c @@ -0,0 +1,14 @@ +# PostgreSQL's Database Directory +PGDATA=/var/lib/postgresql/data + +# Logfile path: (NOTE: This must be uid/gid owned by the value of $PGUSER!) +PGLOG=/var/lib/postgresql/data/postgresql.log + +# Run the PostgreSQL user as: +PGUSER=postgres + +# Extra options to run postmaster with. +# If you want to enable TCP/IP for PostgreSQL, add -i to the following: +# PGOPTS="-N 1024 -B 2048 -i" +PGOPTS="-i" + diff --git a/dev-db/pgcluster/files/pgcluster.init-1.3.0c b/dev-db/pgcluster/files/pgcluster.init-1.3.0c new file mode 100644 index 000000000000..ad1f66f183fb --- /dev/null +++ b/dev-db/pgcluster/files/pgcluster.init-1.3.0c @@ -0,0 +1,90 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/pgcluster/files/pgcluster.init-1.3.0c,v 1.1 2005/05/10 06:40:37 nakano Exp $ + +opts="${opts} reload" + +depend() { + use net +} + +checkconfig() { + if [ ! -d $PGDATA ]; then + eerror "directory not found: $PGDATA" + eerror "You should create PGDATA directory first." + return 1 + fi +} + +start_recover() { + ebegin "Starting PGCluster" + if [ -f $PGDATA/postmaster.pid ]; then + rm $PGDATA/postmaster.pid + fi + + su - $PGUSER -c "/usr/bin/pg_ctl start -D '$PGDATA' -s -l '$PGLOG' -o '$PGOPTS -R'" + + while : + do + cnt=$(($cnt + 1)) + if [ -f "$PGDATA/postmaster.pid" ]; then + ret=0 + break + fi + + if [ $cnt -eq 30 ]; then + eerror "Please see log file: $PGLOG" + ret=1 + break + fi + sleep 1 + done + eend $ret + +} + +start() { + checkconfig || return 1 + + ebegin "Starting PGCluster" + if [ -f $PGDATA/postmaster.pid ]; then + rm $PGDATA/postmaster.pid + fi + su - $PGUSER -c "/usr/bin/pg_ctl start -D '$PGDATA' -s -l '$PGLOG' -o '$PGOPTS'" + + while : + do + cnt=$(($cnt + 1)) + if [ -f "$PGDATA/postmaster.pid" ]; then + ret=0 + break + fi + + if [ $cnt -eq 30 ]; then + eerror "Please see log file: $PGLOG" + ret=1 + break + fi + sleep 1 + done + eend $ret +} + +stop() { + ebegin "Stopping PGCluster" + su - $PGUSER -c "/usr/bin/pg_ctl stop -D '$PGDATA' -s -m fast" + eend $? +} + +svc_restart() { + ebegin "Restarting PGCluster" + su - $PGUSER -c "/usr/bin/pg_ctl restart -D '$PGDATA' -s -m fast -l '$PGLOG' -o '$PGOPTS'" + eend $? +} + +reload() { + ebegin "Reloading PGCluster configuration" + su - $PGUSER -c "/usr/bin/pg_ctl reload -D '$PGDATA' -s" + eend $? +} diff --git a/dev-db/pgcluster/files/pglb.conf-1.3.0c b/dev-db/pgcluster/files/pglb.conf-1.3.0c new file mode 100644 index 000000000000..37fbd86eb51c --- /dev/null +++ b/dev-db/pgcluster/files/pglb.conf-1.3.0c @@ -0,0 +1,2 @@ +# Run the load balancer user as: +PGUSER=postgres diff --git a/dev-db/pgcluster/files/pglb.init-1.3.0c b/dev-db/pgcluster/files/pglb.init-1.3.0c new file mode 100755 index 000000000000..0aadc3f8d2da --- /dev/null +++ b/dev-db/pgcluster/files/pglb.init-1.3.0c @@ -0,0 +1,20 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/pgcluster/files/pglb.init-1.3.0c,v 1.1 2005/05/10 06:40:37 nakano Exp $ + +depend() { + use net pgreplicate pgcluster +} + +start() { + ebegin "Starting PGCluster Load Balance" + su - $PGUSER -c "/usr/bin/pglb -D /etc/pgcluster" + +} + +stop() { + ebegin "Stopping PGCluster Load Balance" + su - $PGUSER -c "/usr/bin/pglb -D /etc/pgcluster stop" + eend $? +} diff --git a/dev-db/pgcluster/files/pgreplicate.conf-1.3.0c b/dev-db/pgcluster/files/pgreplicate.conf-1.3.0c new file mode 100644 index 000000000000..a6bf02915d7a --- /dev/null +++ b/dev-db/pgcluster/files/pgreplicate.conf-1.3.0c @@ -0,0 +1,2 @@ +# Run the pgreplicate user as: +PGUSER=postgres diff --git a/dev-db/pgcluster/files/pgreplicate.init-1.3.0c b/dev-db/pgcluster/files/pgreplicate.init-1.3.0c new file mode 100755 index 000000000000..a9fc4df04a0b --- /dev/null +++ b/dev-db/pgcluster/files/pgreplicate.init-1.3.0c @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/pgcluster/files/pgreplicate.init-1.3.0c,v 1.1 2005/05/10 06:40:37 nakano Exp $ + +depend() { + use net +} + +start() { + ebegin "Starting PGCluster Replication Server" + if [ -f /var/lib/pgcluster/pgreplicate.pid ]; then + rm /var/lib/pgcluster/pgreplicate.pid + fi + su - $PGUSER -c "/usr/bin/pgreplicate -W /var/lib/pgcluster -D /etc/pgcluster" + eend $? +} + +stop() { + ebegin "Stopping PGCluster Replication Server" + su - $PGUSER -c "/usr/bin/pgreplicate -W /var/lib/pgcluster -D /etc/pgcluster stop" + eend $? +} |