To alleviate the need for a start up script somewhat we could perhaps fix
up pg_ctl to serve that purpose better.
-w should be the default, as has been suggested.
"fast" shutdown should be the default, otherwise you may get surprises on
system shutdown when users are still connected.
There should be an option to put the server log somewhere, either a file
or maybe a pipe, e.g.,
pg_ctl -l logfile
pg_ctl -P 'magic-log-rotator -x -y -z'
The current behaviour, start server in background and leave stdin/stdout
on terminal, and no nohup, is just plain wrong.
I think there should also be a reasonable defense against not using one of
these options, but I'm not sure what that could be. Maybe something like
picking a default file based on PGDATA.
There should be an option to not print informational messages, so startup
scripts can implement their own message systems without resorting to the
draconian '>/dev/null 2>&1'.
Some option that invokes 'su' with an appropriate user name. Not sure
whether you can invoke 'su' portably.
Finally, maybe a default PGDATA would be useful, although I'm not fond of
it personally.
Comments?
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/