Re: BUG #7596: Problem with /etc/init.d/postgresql.9.x file

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7596: Problem with /etc/init.d/postgresql.9.x file
Date: 2012-10-12 06:49:08
Message-ID: 5077BD64.30709@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 10/11/12 2:29 AM, david(dot)peyrieres(at)meteo(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Dimitri Fontaine 2012-10-12 08:31:28 Re: BUG #7575: "between" does not work properly with inet/cidr addresses
Previous Message david.peyrieres 2012-10-12 06:03:55 Re: BUG #7596: Problem with /etc/init.d/postgresql.9.x file