Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XZ88g-0005GQ-1R for pgsql-admin@arkaria.postgresql.org; Wed, 01 Oct 2014 00:51:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XZ88e-00024H-RN for pgsql-admin@arkaria.postgresql.org; Wed, 01 Oct 2014 00:51:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XZ88d-00024A-RI for pgsql-admin@postgresql.org; Wed, 01 Oct 2014 00:51:27 +0000 Received: from mail-oi0-f46.google.com ([209.85.218.46]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XZ88Z-000319-Hi for pgsql-admin@postgresql.org; Wed, 01 Oct 2014 00:51:26 +0000 Received: by mail-oi0-f46.google.com with SMTP id h136so80850oig.33 for ; Tue, 30 Sep 2014 17:51:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to:content-type:content-transfer-encoding; bh=wpKu79TsLoDm83rWLCdNdUbuivl3PqgUCwva3Oj0Cqc=; b=HHUGcnYXrEQN67tZqXatZa5LM2jfSBcUGL+dA/a4N/GrbCen6MEATeWUEG/SUedoHf UbIkxXfpBY5kiz+Y4kaja9WCxQt8bnR3zxXy8earlIdsD2BrurVXTRiMF6Es1mpLVHpq Jdx5Rh//wPzuuJRsFs18cozNHKvFy9VoXYcA5vWIUq3kNtvqsYzndhvo1+2KT7QEg+R1 4qFNuFycgR8Yt8bCL9JaXIYe/IlAErNE3ebjytDPtJ7GymcCkBMTv2Ts6/sJx2TbjICH AnyMBWxrTDwPqDHZ34xkqkYPGfOnLOeUJn6t6L3yUzOX/iSkEBLzrxFKULGMaQ4SdA5a MlQQ== X-Gm-Message-State: ALoCoQlC6n7kNZuzS2UEJpHXDKFKUnH5ZLCdHB544ar6dXJGno5/2QPoBgwxeQsKWHTA7D0FY7UbDfEAbEXL6tPN/dXI5uJLasJdw1h4NX3OfsUpn2IQ50QFyV+3fPDpKR6/ezHf/6CW X-Received: by 10.182.103.165 with SMTP id fx5mr52605069obb.61.1412124679829; Tue, 30 Sep 2014 17:51:19 -0700 (PDT) Received: from [192.168.99.67] (c-50-152-13-243.hsd1.co.comcast.net. [50.152.13.243]) by mx.google.com with ESMTPSA id n7sm9351043obh.25.2014.09.30.17.51.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Sep 2014 17:51:19 -0700 (PDT) Mime-Version: 1.0 (1.0) Subject: Re: How to detect if Postgres needs a restart when configuration changes From: Jason Mathis X-Mailer: iPhone Mail (12A405) In-Reply-To: <542B48C5.6070507@2ndquadrant.com> Date: Tue, 30 Sep 2014 18:51:18 -0600 Cc: =?utf-8?Q?Strahinja_Kustudi=C4=87?= , "pgsql-admin@postgresql.org" Message-Id: <7090DAD0-F2CA-4574-9CA0-BBDF6DD85A04@redzonesoftware.com> References: <542B48C5.6070507@2ndquadrant.com> To: Ian Barwick Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) 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 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 l= east it can give you some ideas. https://forge.puppetlabs.com/puppetlabs/postgresql > On Sep 30, 2014, at 6:20 PM, Ian Barwick wrote: >=20 >> On 14/10/01 8:51, Strahinja Kustudi=C4=87 wrote: >> I am automating Postgres deployment on Linux and I need to check if Post= gres=20 >> needs to be restarted when a configuration parameter that requires a res= tart >> changes, e.g. when you change wal_level. Is there a way to detect a para= meter >> which requires a restart was changed? >>=20 >> 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 co= nf 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. >=20 > I created an experimental background worker which records configuration p= arameter > changes after a SIGHUP is received: >=20 > https://github.com/ibarwick/config_log >=20 > It was originally intended to log configuration changes, however it > might be possible to create a query based off the recorded values to dete= ct > changes which require a restart. >=20 > No guarantee of fitness for purpose. Requires 9.3 or later. >=20 >=20 > Regards >=20 > Ian Barwick >=20 > --=20 > Ian Barwick http://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Training & Services >=20 >=20 > --=20 > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin --=20 =20 This transmission contains confidential and privileged information intended= =20 solely for the party identified above. If you receive this message in=20 error, you must not use it or convey it to others. Please destroy it=20 immediately and contact the sender at (303) 386-3955 or by return e-mail to= =20 the sender. --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin