From: John R Pierce <pierce@hogranch.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #7596: Problem with /etc/init.d/postgresql.9.x file
Date: Thu, 11 Oct 2012 23:49:08 -0700
Message-ID: <5077BD64.30709@hogranch.com> (raw)
In-Reply-To: <E1TMF5b-0003lt-Sc@wrigleys.postgresql.org>
References: <E1TMF5b-0003lt-Sc@wrigleys.postgresql.org>
On 10/11/12 2:29 AM, david.peyrieres@meteo.fr wrote:
> In my case, I've 5 databases on same server. Each database is start/stop
> with this file 'service postgresql9.x start'.
one database 'cluster' (instance of the postmaster, with a corresponding
$PGDATA directory) can have any number of databases associated with it,
they all share the same PID file.
I'm not sure of ANY advantage of running multiple different instances of
postgres for seperate databases.
the way the newer RHEL init.d files are setup, if you DO want to run
multiple copies, you create seperate init.d files, like postgresql-9.1a,
postgresql-9.1b, etc, these can all be symlinks to the same
postgresql-9.1 file. you then create corresponding files in
/etc/sysconfig/pgsql/<samename> with PGDATA=/path/to/unique/pgdata and
PGPORT=54xx unique ports... like, as an example...
# cat /etc/sysconfig/pgsql/postgresql-9.0b
PGENGINE=/usr/pgsql-${PGMAJORVERSION}/bin
PGPORT=5433
PGDATA=/ssd/pgsql/${PGMAJORVERSION}/data
PGLOG=/ssd/pgsql/${PGMAJORVERSION}/pgstartup.log
# ls -la /etc/rc.d/init.d/postgresql-9.0b
lrwxrwxrwx 1 root root 14 Oct 23 2011 /etc/rc.d/init.d/postgresql-9.0b
-> postgresql-9.0
by doing it this way, you're not editing any files that are under RPM
package management, so you're not going to get bit during updates.
--
john r pierce N 37, W 122
santa cruz ca mid-left coast
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: pierce@hogranch.com
Subject: Re: BUG #7596: Problem with /etc/init.d/postgresql.9.x file
In-Reply-To: <5077BD64.30709@hogranch.com>
References: <E1TMF5b-0003lt-Sc@wrigleys.postgresql.org> <5077BD64.30709@hogranch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox