Re: pg_ctl wish list - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_ctl wish list
Date
Msg-id 7928.981345871@sss.pgh.pa.us
Whole thread Raw
In response to pg_ctl wish list  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: pg_ctl wish list  (Peter Eisentraut <peter_e@gmx.net>)
Re: pg_ctl wish list  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> 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.

Agreed.

> "fast" shutdown should be the default, otherwise you may get surprises on
> system shutdown when users are still connected.

No, I don't think so.  During a system shutdown, init will deliver
SIGTERM to all the backends as well as the postmaster, so the backends
will die quite handily without the postmaster needing to give them any
additional push.  We should not change to a less-safe default behavior
when there is no need to.

> 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'

Or we could just switch over to syslog as the standard log
destination...

> The current behaviour, start server in background and leave stdin/stdout
> on terminal, and no nohup, is just plain wrong.

Agreed.

> Some option that invokes 'su' with an appropriate user name.  Not sure
> whether you can invoke 'su' portably.

Perhaps the postmaster should have a '-u userid' option and do a
setuid() call ... though I don't know whether this will be materially
more portable than invoking su from a script.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Mitch Vincent"
Date:
Subject: Very odd order by behavior
Next
From: "Mitch Vincent"
Date:
Subject: Re: Very odd order by behavior - followup