Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8TWJ-0007N0-59 for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Jul 2021 20:17:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m8TWI-0005Po-3O for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Jul 2021 20:17:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8TWH-0005Pg-9z for pgsql-hackers@lists.postgresql.org; Tue, 27 Jul 2021 20:17:41 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8TWA-00071X-Pw for pgsql-hackers@lists.postgresql.org; Tue, 27 Jul 2021 20:17:40 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 03E043200319; Tue, 27 Jul 2021 16:17:32 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 27 Jul 2021 16:17:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=vLqK9rHelZ+hvpCZkg4HB6Iq9YM0iak63r3xnCf4k74=; b=iw1o6Q5E cNNtk1gWaJzEwYzq8qSm5vyW9q1PfaYgiEh1bMBtNM1S8a+Opwo7GnwSjK3Ob5DR MpINIiL/f9pxytHjJIRZS+nWG/9kGzheb8dwvLAS3HnKTtHeoL2GjZIqCE4ZB6ZX iwnOE1L0mppEw4PpPMLEZ9GddRhtH37SuvZYxTO//hdzXp0i0QOlAzS9m4FHqSgR +2m01xMnNHcAi2IpVGxSUJCXDWvCbvcGqh/7S0cRDXjFAF7wvoDMSwigrzZbXpLe oH1jbLJgUGesnPgvIdSy8PRuVJjZ6vTMxZU+bQS0YQe5tyOxgtitsK6DssURCLon ZMx3gfMvwVwQwA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrgeejgddufeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedujeevjeffjeevuddutedvkeeiueeitddvieelfeekveej udefgeeuvdejhfeuleenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 27 Jul 2021 16:17:31 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 408EE2A087C; Tue, 27 Jul 2021 16:17:28 -0400 (-04) Date: Tue, 27 Jul 2021 16:17:28 -0400 From: Alvaro Herrera To: Tom Lane Cc: Pg Hackers Subject: Re: pg_settings.pending_restart not set when line removed Message-ID: <202107272017.rueagj54fhmt@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <273674.1627398036@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jul-27, Tom Lane wrote: > So maybe like > > if (gconf->context < PGC_SIGHUP) > { > + /* The removal can't be effective without a restart */ > + gconf->status |= GUC_PENDING_RESTART; > ereport(elevel, > (errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM), Thanks, done that way. > One thing worth checking is whether the pending-restart flag > gets cleared again if the DBA undoes the removal and again > reloads. I think the right thing will happen, but it'd be > worthwhile to check. I tested this -- it works correctly AFAICS. Thanks! -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ Al principio era UNIX, y UNIX habló y dijo: "Hello world\n". No dijo "Hello New Jersey\n", ni "Hello USA\n".