postgresql init script for multiple postmasters

From: Karl DeBisschop <kdebisschop(at)alert(dot)infoplease(dot)com>
To: Lamar Owen <lamar(dot)owen(at)wgcr(dot)org>
Cc: PORTS <pgsql-ports(at)postgresql(dot)org>
Subject: postgresql init script for multiple postmasters
Date: 2002-09-21 04:02:20
Message-ID: 1032580941.1152.11.camel@miles.debisschop.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

Here is the modified startup script for the RPMS that we discussed,
using the typical /etc/sysconfig mechanism to facilitate running
multiple concurrent postmasters. It works, but could use a little
polish. Namely, documentation.

Also, I thought that in addtion to PGPORT, the /etc/sysconfig file
should take general options. That will be easy to add, but I have a
wedding to drive to tomorrow, and it's late so I really do need to
sleep.

As is, the script does what was promised. The way to get 2 concurrent
postmaster with this is simple:

1) make a symlink to the initscript, say /etc/init.d/postgres

2) create /etc/sysconfig/postgres with a non-default PGPORT and PGDATA

3) sudo service postgres start

That's it.

I'll play with it more to see if I can break it -- we've had the
directory reloaction part in production for some time, but the ability
for concurrent instances with the RPM init script is new.

Let me know if you have any comments.

--
Karl

Attachment Content-Type Size
postgresql text/x-sh 6.4 KB

Browse pgsql-ports by date

  From Date Subject
Next Message Nils 2002-09-21 15:10:57 Can't install DBD
Previous Message tanooka 2002-09-15 06:24:29 質問