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 1nWuRT-0004Id-RL for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Mar 2022 06:25:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nWuRS-000126-KD for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Mar 2022 06:25:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nWuRS-00011r-Ax for pgsql-hackers@lists.postgresql.org; Wed, 23 Mar 2022 06:25:58 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nWuRQ-00068C-7i for pgsql-hackers@postgresql.org; Wed, 23 Mar 2022 06:25:58 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 8EF9D5C0178; Wed, 23 Mar 2022 02:25:54 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 23 Mar 2022 02:25:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; bh=2lgOT6KUDwwjKbd9SQULvwRY3fptcxdIpK+p9T tOtBw=; b=FrKGGe3plYF5/9wtxxWxZERsgRAL8ASvzj1LAKbJLSwr0gtc3eCpgA lqeJ4IpoV2YN/BCnOmBATq2CTo4q8hNvmuDbzvqx/6Bqlb3T7aBDJULbV1Tt7k1f DR1JEq9dxVGr45TdKKdqBaXwDL8xMGXR/cOIS3HFqpmswCnrtnhVCHBbp2JcZ0CO 9+/hsjN3vL61jZt9cSXUD4tYYr1EBQ4O7WUsbkOejMX3e2+42AYn5O/UbHq4Hjho hKQVT4K+WRyJQyR1upnx+mYqyUdA0BmrlLnNSCLGPbo4vpf+xe2ByfkJCx2UpbGz OeTFCB19+ZWsZrNxyIqGc/B24OusXtlw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=2lgOT6KUDwwjKbd9S QULvwRY3fptcxdIpK+p9TtOtBw=; b=UiBWBVIPF/u8YPAy3devmilQ6BPpjMzTt BC7yANsC41bAKwTIyZcELEdG5L9bPNEU/f++Pboe0wa04+AW4p0hQ+cgRuT0IuNP NdudaA+/wZv3EU0jNGUSl3q8sMtTPvUeVy5AGGBcY+2kZmc9pW6POSwMRMzW8lX7 b1ZntLQl9VfAiUq1OzzvfcZ7ztn25jXaxafEFo2D9u60Z2+lJs4SJV85293vlfH8 6iK6EpNH3m7zM/nGzUTopGhjNdb/+zxR0V5SgbP7ycV3XUw4eUfRjcBU+rC8YDl9 xUL49zxOMJ80YCNNcKW4BB1NmdDYi8Q+RG+clezwZSTzE0lhuX1kA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudegiedgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 23 Mar 2022 02:25:50 -0400 (EDT) Date: Wed, 23 Mar 2022 15:25:48 +0900 From: Michael Paquier To: Nathan Bossart Cc: Magnus Hagander , "Bossart, Nathan" , Fujii Masao , Justin Pryzby , Andres Freund , Mark Dilger , Don Seiler , "pgsql-hackers@postgresql.org" Subject: Re: Estimating HugePages Requirements? Message-ID: References: <4cc5b434-b174-9aae-197b-737db6cac4e3@oss.nttdata.com> <6AE0285D-0917-4C05-B6AA-4AEDD2FCBA52@amazon.com> <20220314173417.GA1020555@nathanxps13> <20220315224439.GA1133771@nathanxps13> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YFdnUBvl5rNS2WRT" Content-Disposition: inline In-Reply-To: <20220315224439.GA1133771@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --YFdnUBvl5rNS2WRT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 15, 2022 at 03:44:39PM -0700, Nathan Bossart wrote: > A simple approach could be to just set log_min_messages to PANIC before > exiting. I've attached a patch for this. With this patch, we'll still see > a FATAL if we try to use 'postgres -C' for a runtime-computed GUC on a > running server, and there will be no extra output as long as the user sets > log_min_messages to INFO or higher (i.e., not a DEBUG* value). For > comparison, 'postgres -C' for a non-runtime-computed GUC does not emit > extra output as long as the user sets log_min_messages to DEBUG2 or higher. > puts(config_val ? config_val : ""); > + > + /* don't emit shutdown messages */ > + SetConfigOption("log_min_messages", "PANIC", PGC_INTERNAL, PGC_S_OVERRIDE); > + > ExitPostmaster(0); That's fancy, but I don't like that much. And this would not protect either against any messages generated before this code path, either, even if that should be enough for the current HEAD . My solution for the docs is perhaps too confusing for the end-user, and we are talking about a Linux-only thing here anyway. So, at the end, I am tempted to just add the "2> /dev/null" as suggested upthread by Nathan and call it a day. Does that sound fine? -- Michael --YFdnUBvl5rNS2WRT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmI6vWwACgkQnvQgOdby QH0QEA/+JeDiyJKep/YZvSw8yjk5fb6jtEo31lLXUYdRhOKP3G2B9ymEqDci7qGh 6ETze75LAl7vGO0ReiHfGFezpZzZFeaKfAoxqu9UIUVMLYGurYWy5ARdMlbqKS31 dlYBqnwn5kF+vco7RiKZnpSZdtFbXRenTVI7l8mx5AxDldNG3O+PkJk7fBqlYyM7 3qJ7g6LaDeh1/LOlKFt6WRpBQ6Q/W8g1c7d36NHtks0amY3pUN/+/et2IaZP9SJh AQkbZdXNugIXHpCvqJKY4uJ4NrKK/1Po0ah4EChyAXqQqnhjmTww4oFoh3s98zqf l9OwnyfpkX9F7p7qeUpBIUlk0fb9TMkHBFli9FdhqA/rmKJZUdAxYlDWkak/Fc07 aVhJFMh+iFqbvfakNaKKQJsb12vfQ1Inpy03CI/hGCVL4i7clvcqmHiZwXeCk8BT s3umZoYzMSzhxloRpMVddljqQGTAm6qfZ7mCuiXjn3h4g9SlZDcZV2OPSmMAUCWw aNUibl7zahtU8o7um0IjfPpvgVbSVzBNTMx9ui1nWlb1zRyymiY4g8yFutx+Gkno XK+Qps+70GRMsw1tfgU1vwBPvAXh508BOkXj6XN298HldQ/vOFvTxkCZKIigzedJ ss4aBahqwlP12Y9fjebuqgIQ8l/vb+pZyxNw/0lG+IZCGlQeolg= =F202 -----END PGP SIGNATURE----- --YFdnUBvl5rNS2WRT--