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 1pe7Y1-0000YL-EU for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Mar 2023 04:55:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pe7Xz-0004Pz-DC for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Mar 2023 04:55:03 +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 1pe7Xx-0004Pm-Q7 for pgsql-hackers@lists.postgresql.org; Mon, 20 Mar 2023 04:55:03 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pe7Xu-0005Zc-Qj for pgsql-hackers@postgresql.org; Mon, 20 Mar 2023 04:55:00 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 492255C006A; Mon, 20 Mar 2023 00:54:56 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 20 Mar 2023 00:54:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type: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=fm2; t=1679288096; x=1679374496; bh=Dp 2io+XCNZlzvgeFkLSOowMhLndFl4HAYybDVCbQIl0=; b=jfJ1/grBb0e2zB7aI2 fyIavR+GzDP7H7MvldwqyoqKZwQPQGxLPg7doOiVyrU87JZ+M/I35vIFRA+xPYLq 4YQr+jKsFgDXi7BowQg2ANZfu5Vodm1hwyB7T5/OhZT4VgKmb4OHXEJgjk0DVxVr h2R4yIaUOu6Dgim0nCBuAMf7m9u6BjXyWJ4YlZvQEb4kU5N07VJ2iYCbrFq8d2Yh RAK24HANnb/4N4uCTd4NMA2svCFfcZIp54Cshyz32PKYaR9nQb7i/ZNrPVNAhNxM KnTyBpoDziv/ntcKCk0dgDkgQChhDN6IJ6XJlngZr+1VHaKWeInFsnf5Yz4lO5ek pddw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id: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=fm2; t=1679288096; x=1679374496; bh=Dp2io+XCNZlzv geFkLSOowMhLndFl4HAYybDVCbQIl0=; b=ojqR3T4dMt/+npy6WYc8sND+dyFhb BBmW5UWUpritg9i8vMSCty/5JPWN2BptoHPnP/YaaBbFkjotvpsvw6jmlJfwra3L vNEf49W2QAE4uxx3peEd+/gJ6L7VzcxRZy99zH0DVSFaHetPbRzKowXqcbFE8TEu /wcg56xdf3YWEPS5T8maKdWkolp0Lwk3ffcBbJx3sd1TwlPdwGqxV0uHieiQrLj5 L8RYaaBxLS6g6+uGkFfZLTXSsE5T23Q0dgRbYzbtaWWHvQFVbL2uW82+RlbWhYkl aYf/ht4oc+P//giDQ0HUsO96zBhWeZp+mQ9BDqMnD37qJnjHnfJh5VZKQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdefjedgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghq uhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvg hrnhepteelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdej necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitg hhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Mar 2023 00:54:51 -0400 (EDT) Date: Mon, 20 Mar 2023 13:54:46 +0900 From: Michael Paquier To: Kyotaro Horiguchi Cc: sfrost@snowman.net, pryzby@telsasoft.com, alvherre@alvh.no-ip.org, andres@anarazel.de, nathandbossart@gmail.com, jchampion@timescale.com, john.naylor@enterprisedb.com, masao.fujii@oss.nttdata.com, noriyoshi.shinoda@hpe.com, pgsql-hackers@postgresql.org, rjuju123@gmail.com, sawada.mshk@gmail.com, tgl@sss.pgh.pa.us, thomas.munro@gmail.com Subject: Re: Improve logging when using Huge Pages Message-ID: References: <20230314.140219.1927496956011370958.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lK9vMLp7g0xOOet6" Content-Disposition: inline In-Reply-To: <20230314.140219.1927496956011370958.horikyota.ntt@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --lK9vMLp7g0xOOet6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 14, 2023 at 02:02:19PM +0900, Kyotaro Horiguchi wrote: > Regarding huge_page_active, its value remains constant throughout a > postmaster's lifespan. In this regard, GUC may be a better fit for > this information. The issue with using GUC for this value is that the > postgres command cannot report the final value via the -C option, > which may be the reason for the third alternative "unknown". >=20 > I slightly prefer using a function for this, as if GUC is used, it can > only return "unknown" for the command "postgres -C > huge_page_active". However, apart from this advantage, I prefer using > a GUC for this information. The main advantage of a read-only GUC over a function is that users would not need to start a postmaster to know if huge pages would be active or not. This is the main reason why a GUC would be a better fit, in my opinion, because it makes for a cheaper check, while still allowing a SQL query to check the value of the GUC. -- Michael --lK9vMLp7g0xOOet6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmQX5xYACgkQnvQgOdby QH1b/RAApY5IG6t01Oe6g87eLa+N20AAvxGKS6GeRompJji8/DohTrCA1UcQDLjt Em2SBfxYS2lH7udMxfQvc8q9ro3NBD84Bk0wraygLD/+oxlbYaVL3it3pkgPuzRv gkLrKL2fu4Z2aliHtHdYKu6qxSlWbor04C3hhmTZJBLcuFj5F3pFiJQOXAdt+Axw HigOGjsmDSkYg+W2K0vMsBog5KCxqbpeISYPzm/VkKnomz6DnlNRt+eM/XclpUDe DgV4k0zFSgWxTrIJgZHlcnx4CZ9jFdPFweFlMOsIy9Omh4nYW7DIyR/sShkcXGPm gk6KjGNE75Q1pR3Sq776HwTJU5RNn/j+eZUDmQS6UXPKsZkH9hW5vMfdDSFojfJ7 9AgkwrbMRCsZQ+O3haBgYfM3Zrx6EkwEY0EZ2ONQe0NSeUtEknfmGj7ZRTXX3CD7 f1VUxXVifw5kJbfSlkEj39DxmmscMQ/Sgw/iJVpb5Y3xWSppo0lsD24SbxOpm6+K TskMRsKFL1vTQQjovWtM34rvVd4G/6VMYD+Uicd8zurvBQhnpxPiFbYFmu50gfWK EYFXGFVxuPWcsnVhJ3EBhjKPn1LZl7NP7IP2KIAbm/1YlHhU75uD6C/ADpcZOA45 hV8eXepF897Q4OwevKOIAcCshPKbQAaKnjvWD06Fq3RNxa12PxM= =8yaD -----END PGP SIGNATURE----- --lK9vMLp7g0xOOet6--