postgresql init script for multiple postmasters - Mailing list pgsql-ports

From Karl DeBisschop
Subject postgresql init script for multiple postmasters
Date
Msg-id 1032580941.1152.11.camel@miles.debisschop.net
Whole thread Raw
List 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

pgsql-ports by date:

Previous
From: "tanooka"
Date:
Subject: 質問
Next
From: Nils
Date:
Subject: Can't install DBD