Re: pg_ctl wish list

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_ctl wish list
Date: 2001-02-05 04:04:31
Message-ID: 7928.981345871@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mitch Vincent 2001-02-05 04:05:13 Re: Very odd order by behavior - followup
Previous Message Mitch Vincent 2001-02-05 04:00:08 Very odd order by behavior