pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jason Mathis <jmathis@redzonesoftware.com>
To: Ian Barwick <ian@2ndquadrant.com>
Cc: Strahinja Kustudić <strahinjak@nordeus.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: How to detect if Postgres needs a restart when configuration changes
Date: Tue, 30 Sep 2014 18:51:18 -0600
Message-ID: <7090DAD0-F2CA-4574-9CA0-BBDF6DD85A04@redzonesoftware.com> (raw)
In-Reply-To: <542B48C5.6070507@2ndquadrant.com>
References: <CADKbJJVwK9Gx=UEAZQthz-_6kOOcd36_qnyX0+R9StD4bmcH6w@mail.gmail.com>
	<542B48C5.6070507@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

How are you automating? Have you looked at puppet or anything? Puppet labs maintains a postgresql module that has all that baked in. Check it out at least it can give you some ideas.

https://forge.puppetlabs.com/puppetlabs/postgresql



> On Sep 30, 2014, at 6:20 PM, Ian Barwick <ian@2ndquadrant.com> wrote:
> 
>> 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

-- 
 

This transmission contains confidential and privileged information intended 
solely for the party identified above. If you receive this message in 
error, you must not use it or convey it to others. Please destroy it 
immediately and contact the sender at (303) 386-3955 or by return e-mail to 
the sender.


-- 
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: <7090DAD0-F2CA-4574-9CA0-BBDF6DD85A04@redzonesoftware.com>
Permalink:  ../7090DAD0-F2CA-4574-9CA0-BBDF6DD85A04@redzonesoftware.com/
Also on:    postgresql.org/message-id/7090DAD0-F2CA-4574-9CA0-BBDF6DD85A04@redzonesoftware.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jmathis@redzonesoftware.com, ian@2ndquadrant.com, strahinjak@nordeus.com
  Subject: Re: How to detect if Postgres needs a restart when configuration changes
  In-Reply-To: <7090DAD0-F2CA-4574-9CA0-BBDF6DD85A04@redzonesoftware.com>
  References: <CADKbJJVwK9Gx=UEAZQthz-_6kOOcd36_qnyX0+R9StD4bmcH6w@mail.gmail.com> <542B48C5.6070507@2ndquadrant.com> <7090DAD0-F2CA-4574-9CA0-BBDF6DD85A04@redzonesoftware.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