pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ian Barwick <ian@2ndquadrant.com>
To: Strahinja Kustudić <strahinjak@nordeus.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: How to detect if Postgres needs a restart when configuration changes
Date: Wed, 01 Oct 2014 09:20:21 +0900
Message-ID: <542B48C5.6070507@2ndquadrant.com> (raw)
In-Reply-To: <CADKbJJVwK9Gx=UEAZQthz-_6kOOcd36_qnyX0+R9StD4bmcH6w@mail.gmail.com>
References: <CADKbJJVwK9Gx=UEAZQthz-_6kOOcd36_qnyX0+R9StD4bmcH6w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (11+ messages)  latest in thread

Message-ID: <542B48C5.6070507@2ndquadrant.com>
Permalink:  ../542B48C5.6070507@2ndquadrant.com/
Also on:    postgresql.org/message-id/542B48C5.6070507@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ian@2ndquadrant.com, strahinjak@nordeus.com
  Subject: Re: How to detect if Postgres needs a restart when configuration changes
  In-Reply-To: <542B48C5.6070507@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox