Re: Bug with pg_ctl -w/wait and config-only directories - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Bug with pg_ctl -w/wait and config-only directories
Date
Msg-id 1317803023.26360.5.camel@fsopti579.F-Secure.com
Whole thread Raw
In response to Re: Bug with pg_ctl -w/wait and config-only directories  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bug with pg_ctl -w/wait and config-only directories  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On tis, 2011-10-04 at 17:49 -0400, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Greg Stark wrote:
> >> An interactive tool can dwim automatically but that isn't appropriate
> >> for a startup script. A startupt script should always do the same
> >> thing exactly and do that based on the OS policy, not based on
> >> inspecting what programs are actually running on the machine.
> 
> > I agree, except the Gentoo script does exactly that --- wait for
> > completion using pg_ctl -w.
> 
> As of fairly recently, the Fedora package also uses pg_ctl for both
> starting and stopping.  We've fixed all the reasons that formerly
> existed to avoid use of pg_ctl, and it's a real PITA to try to
> implement the waiting logic at shell level.

Well, it's debatable whether an init script should actually do any
waiting.  I'm not saying that what you are doing is wrong, but it
depends on local policy and conventions.  I maintain some unrelated init
scripts in Debian and have gotten occasional hell from users for holding
up the boot process even a bit while waiting for the service to become
fully operational.  A restart of a failing PostgreSQL server can take
minutes; I don't want to think about how that would be received. :-/
Considering how much work people are putting into speeding up the boot
process in Linux distributions at the moment, with upstart, systemd
etc., it's not clear to me that the waiting feature is a required
behavior.




pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Double sorting split patch
Next
From: Peter Eisentraut
Date:
Subject: Re: Bug with pg_ctl -w/wait and config-only directories