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 1pet2A-0000XG-HN for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Mar 2023 07:37:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pet29-0004un-E5 for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Mar 2023 07:37:21 +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 1pet28-0004ue-LR for pgsql-hackers@lists.postgresql.org; Wed, 22 Mar 2023 07:37:21 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pet24-00011D-Kf for pgsql-hackers@postgresql.org; Wed, 22 Mar 2023 07:37:20 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id D10F432008FA; Wed, 22 Mar 2023 03:37:12 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 22 Mar 2023 03:37:14 -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=1679470632; x=1679557032; bh=Ld xSFcPCeVu5CUvMnqSYMHlF0LAU/gQLWtdPfxaC5us=; b=IhNnJdVwNSmhhufyi5 /LcOara698dKTah2i4sOzyeJ/fIGRf7FMnYnuFtwyvyhurZ+613D38FL+6KpEaz5 8AnZ9gL5hwLfwiTg4FgEPdFi6USZHqItqMMhOnFIeIX9fT3fNPARNUbbq1FY9oeL Bi4g7rt5H01xsQ2l3mthT8Q8yaG57uREIYEDs8H//n1z3+r+ygVYk75a0a8F0KSs QhH3E9Tp/gSNqxG8TeFvInw6Xh6KcURtQ/DBy+QZhT9jir/rP1jCSpeRN3JGQDsw pEUshfaXSkYMOxmIdMVIswbRp0zTcfxAcWMjIGMiIoq8NNOAR6RfnzUoV7r+m9R6 4GpQ== 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=1679470632; x=1679557032; bh=LdxSFcPCeVu5C UvMnqSYMHlF0LAU/gQLWtdPfxaC5us=; b=kLD4yNnj15MzlFiZhX+ojTS5S7nC5 CcREzSi0DSrdVtRg/v9rnJZrRRUc6It4J4bBYRTOKhGg9HsQnKfI3tiDe7CUltyQ DlL6MMC6QORs8zBzH6RChY7gZsT0EQu6Is7eBySa9J6SO4wQ5G5Vk/NU/s8ReLZq 7/4JEn9XwCcJGPFIqjHKXolrXjmF0BGPp1K34KzVLUG4bvmfHKyi78oU9clZm76D OKWviLQ5OepOZDMIVnTZZofWMZvqsW6YdfK7rhzIzc5tTS80caUzbjdTGyLS4Xqx LzveY+ud928JXoa92o3WJe3htB09gm7QOIoGvi0Wcqf7wQM82oJ1vu7Aw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeguddgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdefhedmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreer tddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlse hprghquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeegffejvefgveduvdejtddv tdeijeehudeuledvudeftdfgfeejvdekveekiedvvdenucffohhmrghinhepphhoshhtgh hrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Mar 2023 03:37:05 -0400 (EDT) Date: Wed, 22 Mar 2023 16:37:01 +0900 From: Michael Paquier To: Justin Pryzby Cc: Kyotaro Horiguchi , sfrost@snowman.net, 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: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7XZMWcYSCgxwBywo" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --7XZMWcYSCgxwBywo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 21, 2023 at 09:19:41PM -0500, Justin Pryzby wrote: > You set this patch to "waiting on author" twice. Would you let me know > what I could do to help progress the patch? Right now, I have no idea. My mistake, I've been looking at an incorrect version of the patch. Thanks for correcting me here. I have read through the proposed v5 of the patch, that seems to be the latest one available: https://www.postgresql.org/message-id/ZA+Bpk/6LcYiUXnh@telsasoft.com I have noted something.. For the WIN32 case, we have that: +++ b/src/backend/port/win32_shmem.c @@ -327,6 +327,8 @@ retry: Sleep(1000); continue; } + + huge_pages_active = ((flProtect & SEC_LARGE_PAGES) != 0); break; Are you sure that this is correct? This is set in PGSharedMemoryCreate(), part of CreateSharedMemoryAndSemaphores() in the startup sequence that creates the shmem segment. However, for a normal backend created by EXEC_BACKEND, SubPostmasterMain() reattaches to an existing shared memory segment, so we don't go through the creation path that would set huge_pages_active for the process just started, (note that InitPostmasterChild() switches IsUnderPostmaster, bypassing the shmem segment creation). -- Michael --7XZMWcYSCgxwBywo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmQasB0ACgkQnvQgOdby QH3NBRAAn8vnyeT0PbLbdrVdRjp3bPfzGTmz2NAeJCcfmb6aw2q7theLcTrLLDgt IecraH4VUllyWlozKJRRpLtZ536glcXZMI7WkvGR36hU3IOauDoDC1LwTLr7r8EJ n7SLs3CJAKfTOVU5ptPf3hQsDICQFJh8McxS0ZCKMkxxNe5Yreabxwh4tqGJPxVJ vsuuKo+jBJFa+985DKiyyMeYk41caYjQUfO2eV+NkkpxJCsxAkp+aB/GVq5aqmKZ gbo/2KHyaBLJKD5xykJOW32ycPP2ml2OAehTEJfX4rTgKoXeshaYvSPJc/+V2wWZ GlzVW3Tn4um7lY80h2tDVROZydXqXpgpFLpFXvQKIFRJWstE3BFI94Abh1z2K71N IE+1VZv+w8tHVy4kTA+OYZYvmNEOJ9Yzc4X0BRcLiDWhwiQvaz5QsYX8mfc3djeR JsHIhvZleJqFGReSzCvlZ2PG35f5SDOpzTa2AzLD2OGYd6Te0Dej+g6uIeLXvOuO hjNuaq2vpOrVIEmAdzMnv+XHiYqRp9PsHSjfXEMjV2qpmQaM8DjSwqCHiTeJ4RXX Zyh7FyJvRtWIEbiPwwTEDiLX6/AYUMYMk9kzT8wDsvq5OmOnxvL0zpbsztzCk/Fl e73qL1FNUGKyTxgxSEomP2tEtGW3QIy3uizQtOR8+A6+3UXjki8= =EtrT -----END PGP SIGNATURE----- --7XZMWcYSCgxwBywo--