From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | More legacy code: pg_ctl |
Date: | 2013-11-19 01:09:49 |
Message-ID: | 528ABA5D.8040705@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
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
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2013-11-19 01:20:38 | Re: More legacy code: pg_ctl |
Previous Message | David Johnston | 2013-11-19 01:05:45 | Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block |