I've implemented the following changes in pg_ctl:

* Make -w the default for shut down, add -W option to specify no wait.

* Add -l option to name log file.  If the option is omitted, then the
postmaster log goes to stdout, so you can use 'pg_ctl ... > log' and still
get pg_ctl's stderr on the terminal.

* Proper file descriptor redirection to allow postmaster to detach from
shell's process group.

* Add -s option to turn off informational messages, so as to not mess up
the carefully crafted Red Hat-style startup screens.  Error messages still
show up.

This should make pg_ctl a lot more suitable for startup scripts and
overall.  If this is okay then I'll also try to merge the contrib/linux
and contrib/init.d scripts and reflect these changes there.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Wed, 7 Feb 2001 23:16:11 +0100 (CET)
Peter Eisentraut <peter_e@gmx.net>
pg_ctl changes
Peter Eisentraut <peter_e@gmx.net> writes:
> I've implemented the following changes in pg_ctl:

Sounds good to me.

> * Add -l option to name log file.  If the option is omitted, then the
> postmaster log goes to stdout, so you can use 'pg_ctl ... > log' and still
> get pg_ctl's stderr on the terminal.

Let's see if I've got this straight --- the postmaster's stdout and
stderr go to the -l file (by default pg_ctl's stdout), while pg_ctl's
own stderr is kept separate for failure notices?  That seems like it
will work ... in particular one could imagine doing
	pg_ctl start | log_splitter_process
to handle log rotation stuff.

			regards, tom lane

Wed, 07 Feb 2001 17:19:58 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_ctl changes 
Peter Eisentraut wrote:
> I've implemented the following changes in pg_ctl:
[snip]
> This should make pg_ctl a lot more suitable for startup scripts and
> overall.  If this is okay then I'll also try to merge the contrib/linux
> and contrib/init.d scripts and reflect these changes there.

Sounds good to me.  It appears that you haven't checked in your changes
to CVS as of a few minutes ago, but I like the looks of what you've
posted.
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11

Wed, 07 Feb 2001 17:27:00 -0500
Lamar Owen <lamar.owen@wgcr.org>
Re: pg_ctl changes