Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w54QU-002rY0-1m for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Mar 2026 16:16:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w54QT-007kba-0I for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Mar 2026 16:16:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w54QS-007kbS-2O for pgsql-hackers@lists.postgresql.org; Tue, 24 Mar 2026 16:16:17 +0000 Received: from fout-b4-smtp.messagingengine.com ([202.12.124.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w54QQ-00000000ofj-3hVP for pgsql-hackers@lists.postgresql.org; Tue, 24 Mar 2026 16:16:16 +0000 Received: from phl-compute-11.internal (phl-compute-11.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id 17ACB1D001C8; Tue, 24 Mar 2026 12:16:13 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Tue, 24 Mar 2026 12:16:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm3; t=1774368973; x= 1774455373; bh=+EBbTI05TbNMl1C8XvVZeR2et6ozxI+xaj/Mo4ns8AI=; b=e 95EliZlSkL+OUf+bTH1LrvpOGFg7xwKOLk9NpGYoJs5SVUO+r8FolONHayi/NCet hUCsmqEmbvylKtaaAovAMPk0xQU1Jm9VCtIS68PzJpTmZKjp6ngUQTva/xCtWNZv lKypnNUyrUFwKf456hLtP1N5ceNuDw8gdXuIPar/XVopZTggpLCzvIqqZKc//JV7 qPAZHZZrQnLUTwtzE6jnCoPQn/4sulsklGfY2iGetvRDaA/+BxWE4SIVHlonmyNJ aFXvenLSebL/Mx/wN89Ku/vlce8j5zoGGXfvyo9N48KbW2ZKKoLDknRm4vIzKiWS XcOLRTigYHyD7xyFJg6vg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1774368973; x=1774455373; bh=+ EBbTI05TbNMl1C8XvVZeR2et6ozxI+xaj/Mo4ns8AI=; b=T+TgTEsxKZ0kg5jvp SB6hO2VWki9LQ7tA4wV4ThlKq/aJeIQEdolEEOpRbibK2qcR3ePGNuzaRFL2pt+m YFayBrut61ZUxENi64/Gad/h9Rub1IJHPQnVnJJrlQxYTAoGLvsiGsSC68mWS1bx LXc6CMgRnaAW9lYqgH1htB82c3DPCl2UkEtbFJgKHUzIqOgfWz6dP1sD6IS9MaOC aLelrTqqdF7rFoAfioDgFa+d7+o7F4qtYrGDLoCsY/Lui7M68ukCnT0ZMeS57D83 S3YKGHdRAKBl6Myol9kjcy80ev5l+Lb/9Zroo08K+3ENyK+UjXRaQFuaf/SyQYaO UbfVg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefvddvtdegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeetuedvheffkeevgfeuheevteevkefggedttdeufeeuheduuddthfef fffhjeefffenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeeipdhmohguvgepshhmthhpoh huthdprhgtphhtthhopegrnhgurhgvshesrghnrghrrgiivghlrdguvgdprhgtphhtthho pegsvghrthhrrghnuggurhhouhhvohhtrdhpghesghhmrghilhdrtghomhdprhgtphhtth hopehhthgrmhhfihgushesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlsehj qdgurghvihhsrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhish htshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepmhhitghhrggvlhesphgr qhhuihgvrhdrgiihii X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 24 Mar 2026 12:16:12 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1774368971; bh=2yHRDxAXhZWYyMDcHiU/7WEeDEIT3CwqJMG192qPtOI=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=2/YqW2pFTNOQ57zTJZTh8/lp6wys5c90Ktooz+QgjHcTlJraTPuSHCqyLuHxR+vjl 09sclY9+3ItT9f9dowTTOGjBIz6507EYxzRHJqXts16gLXsrvJEFR+oSnZxFVQqYOK neVQGHiVIiI/Oxb7V6OvSoWPtlQQm31gh06isds4KDDSN+3VbDnJ+qtRAaV1p3gIbv y0R9fdy+Y0LJ3Ay30lY7daHuHKlPjiUZaq0nuXF3WEPdXhbj/8aMjd+dhGNy/W2wF5 IP2hdt4CaZiH/QZEl/HwF2+ycyxMiSytjptR1TSWSL2u/A/+SiSG98Y5GC4gljshY8 A3j9gUCZurZcQ== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 5A1B67B; Tue, 24 Mar 2026 17:16:11 +0100 (CET) Date: Tue, 24 Mar 2026 17:16:11 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Bertrand Drouvot Cc: Michael Paquier , Andres Freund , Jeff Davis , Greg Sabino Mullane , "L. pgsql-hackers" Subject: Re: Adding locks statistics Message-ID: <202603241611.3vnou5cwxdpq@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, On 2026-Mar-23, Bertrand Drouvot wrote: > So the changes done in your patches make sense to me. > > I have 2 comments: > > 1/ wait_event.c > > -#include "storage/lmgr.h" /* for GetLockNameFromTagType */ > -#include "storage/lwlock.h" /* for GetLWLockIdentifier */ > +#include "storage/lmgr.h" > +#include "storage/lwlock.h" > +#include "storage/shmem.h" > #include "storage/spin.h" > +#include "utils/hsearch.h" > > hsearch.h is already included into shmem.h so its direct include is not needed. > That said wait_event.c needs it so including it directly might make sense just from > a coding "style" point of view (given that it is harmless as it is protected by > ifndef HSEARCH_H). Hmm, right -- I don't need to add both. Done that way. I also made some alphabetical sorts and pushed this part. > 2/ Not directly linked to your patches > > It looks like that aio_funcs.c does not need lock.h (reported by include-what-you-use). > If we remove its direct include, it's still indirectly included through proc.h > though. But I think that removing its direct include makes sense as it's not > needed at all. I'm not opposed to somebody else making this change, if they want, but I think there's little practical impact. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "En las profundidades de nuestro inconsciente hay una obsesiva necesidad de un universo lógico y coherente. Pero el universo real se halla siempre un paso más allá de la lógica" (Irulan)