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 201110031819.p93IJHC29146@momjian.us
обсуждение исходный текст
Ответ на Re: Bug with pg_ctl -w/wait and config-only directories  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Config-only directories seem to be only adding confusion.  All possible
> > solutions seem to be adding more code and user requirements, which the
> > creation of symlinks avoids.
> 
> > Is it time for me to ask on 'general' if removal of this feature is
> > warranted?
> 
> Well, the way we could fix it is to invent the parse-the-config-files
> option that was alluded to recently.  Then pg_ctl would continue to
> take the -D switch or PGDATA environment variable with the same meaning
> that the postmaster attaches to it, and would do something like
> 
>     postgres --print-config-value=data_directory -D $PGDATA
> 
> to extract the actual location of the data directory.

That works, assuming the server was not started with -o
'data_directory=/abc'.  The only workaround there would be to have
pg_ctl supply the -o, even on pg_ctl stop, and parse that in pg_ctl.

> Whether this is worth the trouble is highly debatable IMO.  One obvious
> risk factor for pg_ctl stop/restart is that the current contents of
> postgresql.conf might not match what they were when the postmaster was
> started.
> 
> I was never exactly thrilled with the separate-config-directory design
> to start with, so I'm probably not the person to opine on whether we
> could get away with removing it.

The entire thing seems logically broken, to the point where even if we
did get code working, few users would even understand it.

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


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Bug with pg_ctl -w/wait and config-only directories
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Bug with pg_ctl -w/wait and config-only directories