Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Дата
Msg-id 20130725205016.GG14652@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Robert Haas escribió:
> On Mon, Jul 22, 2013 at 7:56 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> > I'd be inclined to think that ALTER SYSTEM SET should not be allowed to
> > modify any PGC_POSTMASTER parameters.
> 
> That significantly decreases the usefulness of ALTER SYSTEM without
> actually preventing the underlying problem.  If having multiple
> conflicting values for parameters in the config files doesn't work
> cleanly, then we should fix that, not cripple this feature.

I think the only solution that makes sense here is to comment out the
entry in postgresql.conf.  We weren't supposed to modify that file, but
in light of this problem I'm starting to be of the opinion that we ought
to allow this implementation do this one change.  I admit this is
somewhat problematic: consider that somebody having postgresql.conf open
in an editor while somebody else runs ALTER SYSTEM would see the file
changing underneath.  But at least in Vim, what happens is that the
editor warns you that the file has changed underneath, and asks you
whether you want to load the new version.

Now, this is not likely to be an easy thing to implement ...

Another option would be to separate config loading in two stages; first
read all the files, and only check and throw errors and warnings later,
when we know the definite place that's going to be the authoritative
definition of each variable.

I'm not comfortable with the idea that PGC_POSTMASTER variables should
be treated differently from others.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Preventing tuple-table leakage in plpgsql
Следующее
От: Andrew Dunstan
Дата:
Сообщение: install libpq.dll in bin directory on Windows / Cygwin