Skip site navigation (1) Skip section navigation (2)

Add pg_settings.pending_restart column

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Add pg_settings.pending_restart column
Date: 2015-02-15 03:18:28
Message-ID: 54E01004.3000803@gmx.net (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-hackers
When managing configuration changes through automatic systems like Chef
or Puppet, there is a problem: How do you manage changes requiring a
restart?

Generally, you'd set it up so that when a configuration file is changed,
the server is reloaded.  But for settings that require a restart, well,
I don't know.  From discussions with others, it emerged that a way to
ask the server whether a restart is necessary would be useful.  Then you
can either automate the restart, or have a monitoring system warn you
about it, and possibly schedule a restart separately or undo the
configuration file change.

So here is a patch for that.  It adds a column pending_restart to
pg_settings that is true when the configuration file contains a changed
setting that requires a restart.  We already had the logic to detect
such changes, for producing the log entry.  I have also set it up so
that if you change your mind and undo the setting and reload the server,
the pending_restart flag is reset to false.

Attachment: 0001-Add-pg_settings.pending_restart-column.patch
Description: text/x-patch (7.8 KB)

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2015-02-15 03:51:44
Subject: forward vs backward slashes in msvc build code
Previous:From: Andrew DunstanDate: 2015-02-15 03:06:07
Subject: mogrify and indent features for jsonb

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group