Re: We should Axe /contrib/start-scripts

From: Chander Ganesan <chander(at)otg-nc(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: We should Axe /contrib/start-scripts
Date: 2009-08-26 15:05:38
Message-ID: 4A954F42.4000402@otg-nc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kevin Grittner wrote:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>
>> In general I'd not recommend that an init script go messing with the
>> contents of the postmaster.pid file, which it would have to do to
>> have any of this logic in the script.
>>
>
> But LSB specifically provides the pidofproc function to extract the
> pid info.
>
I think Tom meant that you don't want to modify the contents of that
file (or its timestamp). Reading from the file (and using the data
there) is a whole different story, and is - in part - why the file
exists in the first place.
>
> http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html
>
> This brings me back round to what I was looking at recently -- the
> possibility of trying to make an LSB-conforming init script for
> PostgreSQL. I'm having a lot of trouble, though, trying to get either
> the postmaster or pg_ctl to behave well with the start_daemon function
> implementations available to me. Is there a fundamental mismatch
> there, or am I probably just missing some crucial detail? (The
> killproc function seems to work just fine, however, as long as I use
> the -p switch and give it the right signal.)
>
> And there's the usual question: is there interest in such a script?
>
The script is undoubtedly useful, if nothing more than to provide a
template for Linux distros. However, I think by itself it is used quite
broadly by admins that choose to install from source rather than using a
pre-packaged distribution.

Some time ago I started work on a HeartBeat/OpenAIS resource management
script for PostgreSQL to integrate it more closely with HeartbeatV2 (to
support resource monitoring on a standby, auto-setup of standby node,
etc.) but haven't worked on it since hitting a couple walls that are
somewhat related to this issue. Having a better (and foolproof)
start/stop LSB script would definitely help that project when I get back
to it..

--
Chander Ganesan
Open Technology Group, Inc.
One Copley Parkway, Suite 210
Morrisville, NC 27560
919-463-0999/877-258-8987
http://www.otg-nc.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-08-26 15:06:58 Re: pretty print viewdefs
Previous Message Pavel Stehule 2009-08-26 14:55:52 Re: pretty print viewdefs