Re: Bug with pg_ctl -w/wait and config-only directories

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Mr(dot) Aaron W(dot) Swenson <titanofold(at)gentoo(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug with pg_ctl -w/wait and config-only directories
Date: 2011-10-03 19:03:04
Message-ID: 1317668289-sup-8896@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Excerpts from Bruce Momjian's message of lun oct 03 15:23:47 -0300 2011:
> Peter Eisentraut wrote:
> > On m?n, 2011-10-03 at 11:27 -0400, Bruce Momjian wrote:
> > > Frankly, I am confused how this breakage has gone unreported for so
> > > long.
> >
> > Well, nobody is required to use pg_ctl, and for the longest time, it was
> > pg_ctl that was considered to be broken (for various other reasons) and
> > avoided in packaged init scripts.
>
> Yes, but I am now seeing that pg_ctl is really unfixable. Is the
> config-only directory really a valuable feature if pg_ctl does not work?
>
> If we could document that pg_ctl (and pg_upgrade) doesn't work with
> config-only directories, at least we would have a consistent API. The
> question is whether the config-only directory is useful with this
> restriction.

Evidently people that use config-only dirs don't care all that much
about pg_ctl; we'd have a lot of bugs about it otherwise. But I don't
think that's the case for pg_upgrade. I think that simply dictating the
combination of conf-only dirs and pg_upgrade doesn't work is not going
to be a very popular choice, particularly if there's a simple workaround
such as adding a symlink. (This makes me wonder, though, we don't we
require that said symlink is always in place; maybe have postmaster
create it automatically if it's not present?)

My guess is that we could fix the simple case (the one that doesn't
involve a "-o datadir" option) with the parse-and-report option that has
been mentioned, and dictate that the other one doesn't work. That's
much less likely to cause a problem in practice.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2011-10-03 19:03:47 Re: Bug with pg_ctl -w/wait and config-only directories
Previous Message Heikki Linnakangas 2011-10-03 18:53:11 Re: PostgreSQL X/Open Socket / BSD Socket Issue on HP-UX