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 1pe7g6-0000yY-1u for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Mar 2023 05:03:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pe7g4-0007kV-U8 for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Mar 2023 05:03:24 +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 1pe7g4-0007kL-Ku for pgsql-hackers@lists.postgresql.org; Mon, 20 Mar 2023 05:03:24 +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 1pe7g2-0005e7-BB for pgsql-hackers@postgresql.org; Mon, 20 Mar 2023 05:03:23 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id BF77A5C0074; Mon, 20 Mar 2023 01:03:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 20 Mar 2023 01:03:21 -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=1679288601; x=1679375001; bh=ul 74GsLB6V9fFv2sbuR7bfR8jGQNbm9zszCnUKH5dz0=; b=SZkyP0hOnMwUWI9Sfy va6B+Td2TEmKRPKHPPKdbHzXrexFjVkeYzcZYtyo7g01tcCXr+b4rfCDaFkl+LWG zC/zYerOh0ancEMZitFrVow9SY4rmHuH2hcVpj3X7wA7d99MdMGNjfn+eb/OyG4w ITHFJhmwdaOitx/NQoNIJkq9qq5vHEWWtnStX3PSsk8pJ+6lrRgZYmt9R+fci1ki 7xJ+6bjFyzVYnwgQanBV9OjGtqRcf8Ky0VvyK0V1oYvH7cxOOUOvQYRIXpbFEtCG 6hz1vpLlv508Q5VLCYnEq0OT/DaTGhfHFNsXiNU+9sg5Ew6YoW/nej2d9zGs++pt 6A4Q== 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=1679288601; x=1679375001; bh=ul74GsLB6V9fF v2sbuR7bfR8jGQNbm9zszCnUKH5dz0=; b=lcYHH1keoYAKt2sBhAGWjyLBmq8En 6M0LiqNo5RmZZ5W8FfYGUyXlywVdqoF1ylWEfPypqvnoSEjnQh9y1kXXsf+Tb6Hu eMqHzKUyC2EVanQxEB+WaNUcz50xArdKjJ6XkGjJ6vHQgFtpfq+718kApgQ2cwsw /tG24GHAzi0UmIrBkT7A8K7DRms0GtehhPuLlcf6bpaY0+O/ZAEeBU25DwAPj3qV uAMx394MrCUULcpxG9tl26+qvt88Qfd5DsmXFivms71sk6cnxYWacLmFhmZ6MlB9 WlaEoQ6uu+EzS67fQycnuGrlnWIP6RglPNFUQXmT6qh/EnImOuxD0jrpQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdefjedgkeduucetufdoteggodetrfdotf 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 01:03:17 -0400 (EDT) Date: Mon, 20 Mar 2023 14:03:13 +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="4j8Ey9kIY5yx2r19" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --4j8Ey9kIY5yx2r19 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 20, 2023 at 01:54:46PM +0900, Michael Paquier wrote: > 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. [ Should have read more carefully ] .. Which is something you cannot do with -C because mmap() happens after the runtime-computed logic for postgres -C. It does not sound right to do the mmap() for a GUC check, so indeed a function may be more adapted rather than move mmap() call a bit earlier in the postmaster startup sequence. -- Michael --4j8Ey9kIY5yx2r19 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmQX6REACgkQnvQgOdby QH2+aA/+IDJI5VZ9KyWCbxiTvGRFo0pBLMdyqacRX7z094g5JVoAZ9g7UzTldKRt FGqd1qsVim6gGS5OAs3Bd3+6eF6l16J0Yqct5BIF7x+1jKAzYczQQVKGQ6FWTMk8 2RIE3mvb8ki2PWQsB4nd5NKi5g1Sktvl/hI0fZm2YEBKSWJZID9MutpHuH745EcE VqRh1Ie/yukpRFuacK6VehOEcFde/2WLl+Kr/N+eGGV7iLLZoabOkWmkMiR2OwUO SU6OZNsHkJDWaAzf8v/A2aLd/a9Kgnf4sIOTOYxGEVzi79K9jNy1CPSKNLfhvyO8 HInel6BlWAGHrk8s+he62FvdKk7vdqUZjFgxx+bbc6bqrIxCGkCv7bfoxpwypqvD 6nSKqO4d4cIOVZuL6NXayJIDR8HtRxQ0+hWXmqOyOJYdIEz/1QHCT1bLpUrAiH+A Ro9JLSLQPYfMyPHB0f9EZlT5SQN2xXWopYn9yui8cvKzZYP7Y62T4grmP8Q4iNTD wVI/UsGT7YANqfEgc5/CMAqaKD5Brz13LN/+em1KwngZBd5ai2BBe3n6raoTfz09 S5wnxZPamF5F9IRCj+BUdRoWGvTzusNmlf1+HPKzoqQwWDApqWsMCDFyJUnqOGmZ QfPkYbA0d2EpY5qMlJzMPZ2IJu/Plx2O1rKCPfTtVWrEaGbvCpY= =bYhK -----END PGP SIGNATURE----- --4j8Ey9kIY5yx2r19--