From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Bad UI design: pg_ctl and data_directory |
Date: | 2011-06-01 22:22:56 |
Message-ID: | BANLkTi=AcsUg5-v7+N1KQZzhAMdR6foSwA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 1, 2011 at 5:10 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Josh Berkus <josh(at)agliodbs(dot)com> writes:
>> pg_ctl -D means different things depending on whether you are calling
>> "start" or "stop". For "start", pg_ctl wants the directory
>> postgresql.conf is in, and for "stop" it wants the directory
>> postmaster.pid is in. This means that if your .conf files are not in
>> the same directory as data_directory, you have to write special-case
>> code for start and stop.
>
> Well, the entire business of allowing the config files to be outside the
> data directory is bad design/poor UI. It's not pg_ctl that's the main
> problem here.
>
>> Given that having the .conf files in /etc is the default configuration
>> for both Red Hat and Debian, this seems like really poor UI design on
>> our part.
>
> I can't speak for Debian, but the above statement is 100% false for Red
> Hat. In any case, no RH system has ever expected users to issue pg_ctl
> start/stop directly, and I think the same is true for Debian, so the
> bizarre design wouldn't matter to us even if the case did apply.
>
>> It actually seems relatively easy to fix this without breaking
>> backwards-compatibility.
>
> No, it isn't. You're making way too many assumptions about where things
> really were and what arguments were given to pg_ctl start. We went
> around on this before, which is why it's not "fixed" already.
ISTM that it would be useful to run postgres in a mode where it
doesn't actually try to start up the database, but parses
postgresql.conf and then exits, perhaps printing out the value of a
certain GUC as it does so. In this case, data_directory.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2011-06-01 22:23:09 | Re: Bad UI design: pg_ctl and data_directory |
Previous Message | Kevin Grittner | 2011-06-01 22:09:09 | Re: SSI predicate locking on heap -- tuple or row? |