Re: More legacy code: pg_ctl - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: More legacy code: pg_ctl
Date
Msg-id 528ABCE6.1080304@agliodbs.com
Whole thread Raw
In response to More legacy code: pg_ctl  (Josh Berkus <josh@agliodbs.com>)
Responses Re: More legacy code: pg_ctl  (Robert Haas <robertmhaas@gmail.com>)
Re: More legacy code: pg_ctl  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On 11/18/2013 05:09 PM, Josh Berkus wrote:
> Folks,
> 
> Speaking of legacy code with bad default behaviors: pg_ctl.  The current
> utility is designed to fathfully reproduce the rather hackish shell
> script we originally had for postgres startup.   This results in a
> couple of unintuitive defaults which give sysadmins and config
> management developers headaches:
> 
> a) by default, it returns to the caller without waiting for postgres to
> actually start/stop/restart.  In this mode, it also always returns
> success regardless of result.
> 
> b) by default, it remains attached to the caller's tty for stdout and
> stderr, even after it has switched to the regular postgres log.

Oh, and one more:

c) that "stop" defaults to "smart" mode, instead of "fast" mode.

> Yes, one can work around both of these with -w and -l, but the only
> reason those are non-default settings is that's the way the 7.X era
> shell script behaved.  So at this point we're preserving unintuitive
> default behavior in order to be backwards compatible with a 1999-era
> shell script.
> 
> I don't know if the answer is to rename the utility like we're
> discussing with pg_dump/pg_backup, or something else.
> 


-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: More legacy code: pg_ctl
Next
From: Peter Eisentraut
Date:
Subject: Re: [PATCH] configure: allow adding a custom string to PG_VERSION