Re: postgresql.auto.conf and reload

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: postgresql.auto.conf and reload
Дата
Msg-id CAA4eK1+F9ZtoGvVw-WYj2+vT0K8_JXTziqHp8iVB7wdo1w1Rkw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: postgresql.auto.conf and reload  (Christoph Berg <cb@df7cb.de>)
Ответы Re: postgresql.auto.conf and reload
Re: postgresql.auto.conf and reload
Список pgsql-hackers
On Wed, Jun 25, 2014 at 6:47 PM, Christoph Berg <cb@df7cb.de> wrote:
> Re: Amit Kapila 2014-06-25 <CAA4eK1Log98jvFOV9wzTqpCdEWJa+5JR54TTpkiZ3XBnGJydLA@mail.gmail.com>
> > This will happen without Alter System as well, if you change
> > the value of port in postgresql.conf and try to load conf file with SIGHUP.
> > You cannot reload PGC_POSTMASTER parameters without server restart.
>
> That's not the issue. I did restart the server, which didn't log any
> problems, yet reload keeps complaining indefinitely. This makes ALTER
> SYSTEM not-so-nice-to-use to override parameters already set in
> postgresql.conf.

The main reason behind such such a behaviour after restart is
that there are duplicate entries, one in postgresql.conf and
another in postgresql.conf.  It always first read postgresql.conf
and then .auto file and applies the changed parameters one by one,
so when it reads a different value than current setting, it can lead
to such messages.  During processing of config files it doesn't try
to eliminate duplicate entries.

You can observe same behaviour incase you have another conf
file (special.conf, containing conflicting settings) and include that
in postgresql.conf.

One way could be that while processing if we could eliminate
duplicate entries, then it will not lead to such messages, but I think
that is existing mechanism and not introduced by Alter System,
so changing just for Alter System might impact some existing users.

I think maintaining values both in postgresql.conf and by Alter System
is not advisable.

I am not sure if this addresses your concern completely, but I thinking
changing some existing mechanism (maintaining duplicate entries during
processing of config files) at this point might be risky.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

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

Предыдущее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: pgaudit - an auditing extension for PostgreSQL
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: postgresql.auto.conf and reload