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 1v482a-0093da-81 for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Oct 2025 01:23:28 +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 1v482Y-005ZtO-6J for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Oct 2025 01:23:26 +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 1v482X-005Zry-Cm for pgsql-hackers@lists.postgresql.org; Thu, 02 Oct 2025 01:23:26 +0000 Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1v482V-000xe0-0z for pgsql-hackers@lists.postgresql.org; Thu, 02 Oct 2025 01:23:25 +0000 Received: from phl-compute-09.internal (phl-compute-09.internal [10.202.2.49]) by mailfhigh.phl.internal (Postfix) with ESMTP id 0F4891400238; Wed, 1 Oct 2025 21:23:23 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Wed, 01 Oct 2025 21:23:23 -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=1759368203; x=1759454603; bh=uJolNnT15O 4f8QWZkZsUqcBV4J8ap1PvqvKOmd1qZp0=; b=HmQfz3rWIrY6x0Swc4RlR26DZr VOW9TyViUSW21Nb49CKOWHZyXu9nHO2O/YoQu3DEK+E8DRCPh5oH+YCjGZFTksMv mTeP02u9Tmv0e7qcCTTKTVV8YNQI53mB61nSKKbrH6nFPXO4ipiFFkUrQFVSHYzF rxoABUf9zcPzgf6zE4Lcm0UMLzpDh4chqP+GyPfmQZ/85Wo+V1X6No83pEV2n//S GZM3QMOr/gn7/iWSVx+vJVOMAmfRt0MPZDaYD2I5T1Wv4tTH7/Rhg9dISt/ICfPe g/tLMjhVaDb9CG3LYjNV5OB3JDkB2/33+njBwEwBJ9KuXL9yixMQJSbu7pvg== 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= 1759368203; x=1759454603; bh=uJolNnT15O4f8QWZkZsUqcBV4J8ap1PvqvK Omd1qZp0=; b=eb5GLlW9Qh4aFDO1bST4EbYenDoQq6etBCUokn6xJJxmYV9fTBA rNjLYhx4qZaKJ5zBmB06qg84LLnlGe+b7Y0V/u/lRDSSSJkQg4b4Bj4jOtQlTzQ3 1tvIjcUCvzGYSCp8Vao0W7YHPBWGCzqiyndcOg9SFdFxp6hEbr3TQRBZLk1q+8da 5xGGKLBnAcQqSR9HBeVICb1rrlJ66Y797DbHYaAbJ8vY9X/BJC8N+qKJvQNYrhfU fV4FZODNIaf3YxFDnWEDNTnt4zi6KCTziLZAOQQZY6Kdzxsq3L75b0uBJ4d5MP63 vmx+VWSh0wNc1HncaggKDHkBsp0RuxZ1eIw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdekgeeilecutefuodetggdotefrod 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; Wed, 1 Oct 2025 21:23:20 -0400 (EDT) Date: Thu, 2 Oct 2025 10:23:11 +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="7D3EaSYzB4FSFYHo" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --7D3EaSYzB4FSFYHo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 01, 2025 at 02:33:11PM +0000, Bertrand Drouvot wrote: > I think the first step is to replace (i.e get rid) PGSTAT_KIND_RELATION b= y a brand > new PGSTAT_KIND_RELFILENODE and move all the existing stats that are curr= ently > under the PGSTAT_KIND_RELATION to this new PGSTAT_KIND_RELFILENODE. Likely so, yes. > Let's do this by keeping the pg_stat_all_tables|indexes and pg_statio_all= _tables|indexes > on top of the PGSTAT_KIND_RELFILENODE and ensure that a relation rewrite = keeps=20 > those stats. Once done, we could work from there to add new stats (add wr= ites > counters and ensure that some counters (n_dead_tup and friends) are repli= cated). Do you think it is OK to define non-transactional pending stats as being always a subset of the transactional stats? I don't quite see=20 if there would be a case to have stats that are only flushed in a non-transactional path, while being discarded at the stats report done at transaction commit time. This means that it may be possible to structure things so as the pending non-transaction stats structure are always part of the transactional bits, and that the other way around is not possible. Perhaps that influences the design choices, at least a bit. -- Michael --7D3EaSYzB4FSFYHo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmjd0/8ACgkQnvQgOdby QH22vQ/+ImHm8dzABVUWM53973S5rQNZcPM1xBJeexSFjSjq5d3vtuzaXiis7v5W c/w850+z3A9wwr897j6F2boQm0TbaKKsRlgFhKV4jhTY3bW54IKdsAOA+BKlwpgJ x7TqHwDde4sDhyHU1iYn9fUrl/a4dj8q+C319MQuLJOh7dovNPD0zO2Up/r+Z+8n LXZ7TcO30evL2Jr1aPw3dYYgyKj0nDGGc0Pnqt/XFxsfuqP+FLcM9QBQab80bT4i jhDuWVZw+q4h6ctz3IVLM+rL6dH5lG8aDV3P0l1Vc8sjhehX8F33OuepakssByby TYX9KmTrjyXDqcWzO5x0hQPF1Pikk/KGZg1+aroNT1ORLxqGBMynzgCpX4GlYOY/ ibiWsiVgBCnKdwzoA0vzz8PTogOKZxp1aNhRI8u26vpC22W3OouKuPSBcGo2MHIk noGe+oZIuifVJ/8TBP9M7h2+ihpVtvCg3LTo2vYFgR3wdzy2cwDFLfAsHuOEyCPH NsR1DMEK9JxaBXWu/zRRisk0YGoJCLkff5UP0ZxjRAkMOEYnGrbGWW6VU6f9GtV1 uKjkY1/7iPGLvqqOP1+xFfbc4ct8vhASuysXEGDjdR7tUkeL1EZobl7BjJRDHDws mwcHifUYJYHGXy5Wv7Zpl1uGV0qxNWnaeU0LuptwT6/fQPZ0mg8= =LeOq -----END PGP SIGNATURE----- --7D3EaSYzB4FSFYHo--