Re: Config reload/restart preview

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: Config reload/restart preview
Дата
Msg-id CAA-aLv7cnQMerarjdU+xgxKSjmv+ns+OqYwPjXUdWs0Z8rcy=g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Config reload/restart preview  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Список pgsql-hackers
On 20 June 2013 13:16, Pavan Deolasee <pavan.deolasee@gmail.com> wrote:



On Thu, Jun 20, 2013 at 4:34 PM, Thom Brown <thom@linux.com> wrote:
Hi,

I've noticed that there's no easy way of checking which settings will change if the config is reloaded, and I think not being able to do this can cause some unfortunate problems.

For example, a customer went to change their configuration, just setting log_autovacuum_min_duration to about 20 seconds, and reloaded the server.  However, the log file swelled to over 5GB in size before they realised something was wrong, and then reverted the change.  It transpired that the reload also pulled in a log_statements change from 'ddl' to 'all' that someone must have changed at some point without applying it.

Should we have a way of previewing changes that would be applied if we reloaded/restarted the server?

For example:

pg_ctl previewconfig

SIGHUP: log_statements will change from 'ddl' to 'all'
SIGHUP: log_vacuum_min_duration will change from -1 to 20000
POSTMASTER: fsync will change from 'on' to 'off'

I'm not proposing this specifically, but something that would provide such information.


May be we can have a nice little utility which can show configuration diff between two running servers, or a running server and its modified conf file ? 

Well checking for configuration differences between 2 running servers is kind of a separate feature, and I'm not sure it's going to be needed by that many DBAs.  If they wanted to see differences, they could just create a foreign table to the other and do an anti join.

However, comparing the difference between "a running server and its modified conf file" is the case I'm describing.  I'd personally prefer not to have a whole new utility if it can be avoided.  Magnus mentioned making the necessary changes to pg_ctl so that it can provide unlogged feedback, and pg_ctl does feel more like the go-to tool for such a feature.  Apache has apache2ctl which is responsible for starting, stopping and restarting the server, but also provides a configtest option to check that a restart won't bring the service down.  This seems to be a feature in the same kind of area.  In fact that's pretty much the only action apache2ctl does that pg_ctl doesn't do.

--
Thom

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

Предыдущее
От: Cédric Villemain
Дата:
Сообщение: Re: Bugfix and new feature for PGXS
Следующее
От: "MauMau"
Дата:
Сообщение: Re: backend hangs at immediate shutdown (Re: Back-branch update releases coming in a couple weeks)