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.94.2) (envelope-from ) id 1v3jPh-002cjp-6X for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Sep 2025 23:05:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1v3jPf-00DH7E-85 for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Sep 2025 23:05:39 +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.94.2) (envelope-from ) id 1v3jPe-00DH6K-UY for pgsql-hackers@lists.postgresql.org; Tue, 30 Sep 2025 23:05:39 +0000 Received: from fout-a5-smtp.messagingengine.com ([103.168.172.148]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1v3jPd-000lxA-0i for pgsql-hackers@lists.postgresql.org; Tue, 30 Sep 2025 23:05:38 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 59AFAEC0222; Tue, 30 Sep 2025 19:05:37 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Tue, 30 Sep 2025 19:05:37 -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:subject :subject:to:to; s=fm2; t=1759273537; x=1759359937; bh=9tzZXNkLpO DttatPvYCvParpV/naNLDEmpY0aDkyfMI=; b=gxErzo+jfIlcv3Vust/u1dC/vE /pLJJqDQwGuBXfIe9dv7D9eYsXnNjz8O9BAeE27C9iR/uVYvLBYyVbZiVT8yI+G8 ixTe3TsO+m4gHVDgRZABO1n4rCyjHqx2uC5ZfAhYBsAk7PNVfR2i2k4RI9bRYL4T 4EGTEEsZiYHH/ire1e0JdgYzL1aH8DNi4oqtIjJN6ICs4koHDasNZvurm9SrCSLj iluCWl4egDixtLsBW1TeAJMYMeRClPvLiQkMQw9xv3J8il0VB29jIiAjfBUrqxv3 w4wnUQaRhPopTEkFHwUy9fzcCVEKE1aKusrsfd/CufHRh2c2P1rpLSURGiAQ== 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:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1759273537; x=1759359937; bh=9tzZXNkLpODttatPvYCvParpV/naNLDEmpY 0aDkyfMI=; b=POIFxjUbGe4F/zisn9XsrGv4jMJqlclk8WbQBTJ5VZhaz0RnuKN 9eBx+y/smvX3JJ9hEo+Bb1qd0rmz2P3sGUXy9L2QkBx2fa4KXRNuzM1znV4UrCDe 5A0DB9CC22eRWwY+F53k+V0Yjc7TrvJtu5Px0lY0HefMxjnJB3askwuBxGTYh4cI PQVtN/fsOfPb5aOCCKNfqCN553dPCatPzV6hJeBoatKABn7qzLL2muWf1kiyJz21 xyoY7lrDm3wzga7fQal+IT9Qno5NgT5r22lQpN7ivus9FJV3tF81mHJUfTV7jc/X cXJcErfJPsjhdu+rmF4KWZnioOmV0oL4EHw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdekudejfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlh cuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvden ucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprghquh hivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeggeff hfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhn sggprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegsvghrth hrrghnuggurhhouhhvohhtrdhpghesghhmrghilhdrtghomhdprhgtphhtthhopehrvghs hhhkvghkihhrihhllhesghhmrghilhdrtghomhdprhgtphhtthhopehrohgsvghrthhmhh grrghssehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshes lhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 30 Sep 2025 19:05:35 -0400 (EDT) Date: Wed, 1 Oct 2025 08:05:16 +0900 From: Michael Paquier To: Bertrand Drouvot Cc: Kirill Reshke , Robert Haas , pgsql-hackers@lists.postgresql.org Subject: Re: relfilenode statistics Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8ykivmOTu3g4xpEw" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --8ykivmOTu3g4xpEw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 30, 2025 at 10:13:57AM +0000, Bertrand Drouvot wrote: > As far Michael's concern about adding a new field in the hash key, as 8 b= ytes > is allocated for the object ID, then we can go with: >=20 > dboid (linked to RelFileLocator's dbOid) > objoid (linked to RelFileLocator's spcOid and to the RelFileLocator's rel= Number) >=20 > and avoid adding a new field in the key. RelFileNumber is a 4-byte Oid, so this mapping should be able to work. Is there any reason why you would want an efficient filtering of the contents of the shared hashtable based only on a relnumber or a tablespace OID? Perhaps yes, like when a relfilenode is dropped into a bin for an efficient removal from the shared hashtable so as we don't need to do a seqscan, I just don't remember all the details of the patch and if it could act as a bottleneck in some scenarios. -- Michael --8ykivmOTu3g4xpEw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmjcYiwACgkQnvQgOdby QH1QbQ/+IwmUhrudNRa77nigYZqqJ0sD8S1IlcFytlWivFlrpk87hclGElYz+Max UkJvtLmKGeRlwTu9S+HrPWy8SygOvyb9yh6DJgA76rMY9LKL8kV2zm2nKoeyHMaD czVBcHYSPqaJwMlpu7A7AK5PmOw9DOwyDa9cC47/pWvZ5GLFk2ajQI7BkN8Xw90Q fe3UmHqU9Al3e51Uw+s5DgT5G3aIcNHT93gh9Z/y+cR2S0FpRsDHk+iQGQ+GeXjs CtMqVOzRMfLo3ArOeKATjLQ7RK6YksU+6FE3lyhoFtlrr2qBAjkryaV1vFYeO8pH jFjgbvZLCTPAAtrdh+m6xDZP5jF/udkMCxcHwcB1c9zFQ29Ee+GOi7hbcd0W8/qp 34i8pigJHHiCt4cAzeIN9fkD4fuYrJIhA7kmIFGFFkboy+o1bmD6tE//lUI/u/Bh 513JNLRhFRbzVmN/Hv9OrDs9j2JaQaNz2ofoylibkk1fbExwLmdNcFzTWzBgGd0e J7amntvDBCaCU48RzH2q1ch5T5EZ7P24i9KFu0+0Dq0icY/04ZOFFA94Il+cotZu NlU4Eg2U9q21h0QfwW55YOWWbNB6eaQQdFQeWMyqeY6n9clKqFvmwB4ETPzh5IhC SXJZ7fH3GBR+RCFiT4e8Pb/8b9hWAGTWpIXZ3ZPcENvUABxUtZI= =VdbK -----END PGP SIGNATURE----- --8ykivmOTu3g4xpEw--