Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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 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.
> 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

In response to

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2009-08-26 15:06:58
Subject: Re: pretty print viewdefs
Previous:From: Pavel StehuleDate: 2009-08-26 14:55:52
Subject: Re: pretty print viewdefs

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group