Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XZ7ek-0003Ha-HR for pgsql-admin@arkaria.postgresql.org; Wed, 01 Oct 2014 00:20:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XZ7ej-0003pq-Bv for pgsql-admin@arkaria.postgresql.org; Wed, 01 Oct 2014 00:20:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XZ7ei-0003pk-ID for pgsql-admin@postgresql.org; Wed, 01 Oct 2014 00:20:32 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XZ7ef-0004Cl-2T for pgsql-admin@postgresql.org; Wed, 01 Oct 2014 00:20:30 +0000 Received: from nara.local (p17159-ipngn1701marunouchi.tokyo.ocn.ne.jp [180.0.158.159]) by mrelayeu.kundenserver.de (node=mreue102) with ESMTP (Nemesis) id 0MIv6n-1XWdkH2SF7-002UUT; Wed, 01 Oct 2014 02:20:25 +0200 Message-ID: <542B48C5.6070507@2ndquadrant.com> Date: Wed, 01 Oct 2014 09:20:21 +0900 From: Ian Barwick User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: =?UTF-8?B?U3RyYWhpbmphIEt1c3R1ZGnEhw==?= , "pgsql-admin@postgresql.org" Subject: Re: How to detect if Postgres needs a restart when configuration changes References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Provags-ID: V02:K0:YTjmrwE/Z+o0Vs0sSDpyQOlYujt+ZQagDGqDJ5mmt62 m7DyjNi1fehNRkWJdQR1a5v88eivRf64Ddbgrmf7Be4/uFcaaI +Bpe7sh9hYeDnrfeSNtCLRQDPS0zg5nVrn88zOBbQ7bFU3M9+W XeMtGndVs74zLTHF2/bzsLK4mLVIVKqfR/guotJZb0t2E2A/+l RuksazTqmyjPE2zg0ERgxpPwVOcEQ3cfEeB3Of4SsncP/pShVt 25/JxqqaD1HNYDSOISDs+CxfMoDCn4ELYqjOrk+rbEx2otQwf0 MUzz7EyY5q1LywUYKczVepuPD52R+Xt2vFdoaKewrE0ofJuxxu u8Ytn6usXJxu2qGrenwio9usacizLTbd4jyy3R/Oz X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -2.1 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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