Re: How to detect if Postgres needs a restart when configuration changes - Mailing list pgsql-admin

From Ian Barwick
Subject Re: How to detect if Postgres needs a restart when configuration changes
Date
Msg-id 542B48C5.6070507@2ndquadrant.com
Whole thread Raw
In response to How to detect if Postgres needs a restart when configuration changes  (Strahinja Kustudić <strahinjak@nordeus.com>)
Responses Re: How to detect if Postgres needs a restart when configuration changes
List pgsql-admin
On 14/10/01 8:51, Strahinja Kustudić wrote:
> I am automating Postgres deployment on Linux and I need to check if Postgres
> needs to be restarted when a configuration parameter that requires a restart
> changes, e.g. when you change wal_level. Is there a way to detect a parameter
> which requires a restart was changed?
>
> Reading the log file after sending SIGHUP is not possible to automate. I know
> I can query pg_settings and then compare relevant parameters from the conf file,
> but that means I will need to check all parameters which I set and which require a
> restart. I only need to know if postgres requires a restart.

I created an experimental background worker which records configuration parameter
changes after a SIGHUP is received:

  https://github.com/ibarwick/config_log

It was originally intended to log configuration changes, however it
might be possible to create a query based off the recorded values to detect
changes which require a restart.

No guarantee of fitness for purpose. Requires 9.3 or later.


Regards

Ian Barwick

--
 Ian Barwick                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-admin by date:

Previous
From: Payal Singh
Date:
Subject: Re: How to detect if Postgres needs a restart when configuration changes
Next
From: Jason Mathis
Date:
Subject: Re: How to detect if Postgres needs a restart when configuration changes