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

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Bug with pg_ctl -w/wait and config-only directories
Дата
Msg-id 201110031903.p93J3ls04951@momjian.us
обсуждение исходный текст
Ответ на Re: Bug with pg_ctl -w/wait and config-only directories  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: Bug with pg_ctl -w/wait and config-only directories
Список pgsql-hackers
Magnus Hagander wrote:
> >> So, you are saying that people who want config-only directories are just
> >> not people who normally use pg_ctl, because if they were, they would
> >> have reported the bug? ?That seems unlikely. ?I will admit the Gentoo
> >> case is exactly that.
> >
> > As Dave has pointed out there are many more people that use it, probably
> > most notably Debian/Ubuntu users.
> >
> >> So we just document that config-only directories don't work for pg_ctl
> >> and pg_upgrade?
> >>
> >
> > I'd rather not if it can be avoided.
> 
> I think we "can live" with pg_ctl not working - since that problem has
> already been solved by these people - at least partially.
> 
> Getting pg_upgrade to work would be a *lot* more important.

Well, the users are currently symlinking the config files into the real
data directory and running pg_upgrade that way --- we can document that
work-around.

> I'm not sure how big the overlap is - would it be easier if you moved
> the required functionality into pg_upgrade itself, as you mentioned at
> some point? As in, would it be easier to fix the config-only directory
> case for the limited subset of functionality that pg_upgrade needs?

Not really --- it is the -w/wait mode pg_upgrade needs. There is a lot
of new code in pg_ctl that reads the postmaster.pid file for socket
location, port number, etc, that doesn't make sense to duplicate. 
Frankly, there is the huge problem that they might specify the data
directory on the command line --- that would be a bear to support.

I think the only sane fix is to require pg_ctl and pg_upgrade to specify
the config _and_ real data directory.  The fact that PGDATA/-D currently
can point to a config-only directory means this will lead to a host of
confusion.

What would make more sense would be to add a PGCONFIG/-C parameter that
points to the config directory and make PGDATA/-D only point to the real
data directory.  Yes, it is more work for simple config-only installs,
but it allows pg_ctl and pg_upgrade to work with some sanity.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Bug with pg_ctl -w/wait and config-only directories
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [REVIEW] pg_last_xact_insert_timestamp