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 1tO83T-004JJL-9R for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Dec 2024 04:22:32 +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 1tO83R-006jHy-Uo for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Dec 2024 04:22:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tO83Q-006jHo-VG for pgsql-hackers@lists.postgresql.org; Thu, 19 Dec 2024 04:22:29 +0000 Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tO83N-000WV6-25 for pgsql-hackers@lists.postgresql.org; Thu, 19 Dec 2024 04:22:28 +0000 Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id 0E2BF114013D; Wed, 18 Dec 2024 23:22:23 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Wed, 18 Dec 2024 23:22:23 -0500 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=fm1; t=1734582143; x=1734668543; bh=yUSEwc3QcH YHXf5QlO+y0ClGVC2zS+aTSs/wf0mBb1w=; b=L9Rml/ukZpGZHnDvDevZGxNoaV GKieg+9SVNmsKWQWxceLOZOT0o2/MLOXoKope9EGRe6PQj0lGykeecWNB/eHwXDo 0HtYkfvlgCbxIGgsCtTgzaBdFAIu8/Tvck0ZUJVOdhpAKYmSwIICrQI3NpQEGbzL P5tYEblUTZChgC+Jp0bpQ3mqRFzSuEFooJcnwFKTP5wrFDEDY04nBQXhsCX8uCny 2F0MU6C1bIrCFwMFWtF8rq4eAV12upTKXU42PwxEyJXyV+Fm6q5FC6FCPXNFCD0T bSLB9ME752ZFZX46ZXiiDR2UPdg08XWbimEYX58/Bdv9ccBfYhtt61EWwYXg== 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=fm1; t= 1734582143; x=1734668543; bh=yUSEwc3QcHYHXf5QlO+y0ClGVC2zS+aTSs/ wf0mBb1w=; b=aE9ReKUzeOJ15Pi2GMOsXNQ/gYlhzMYhJyOQ/FYUi6Qt/jRcKlD ACVjg72YXDCX7qpIXy2T9RP0BNgawbdUT6a+SAXj2QSA8J8yJK7NeGRe/AiNDt8m 1sVtk50NjYaWJehOFgZ0i0MkvqQ9v2Y5OZkLXs6ye8kW2HVml3A9CLzmqCospu2g msUljwEuj1oJzoR8XitN42FMPIJQ9CDvKEoXHyRiiSZ1CO3kAM5G/ob+cssGfehY Wa4INAwTzcLb9UqF5uR0K3OTyglzb289jKcVyriXLUnZ7Fzwf22XcwPMaBXwFqEJ nzdnuqvHkem4fhocKGtBj3yflpfqQmqeGAQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrleelgdejtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenfghrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhgg tggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoe hmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleei fedufffhhfdtteelgeeggeffhfekueevteeigfduudevudetgfegiedvjeenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehp rghquhhivghrrdighiiipdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuth dprhgtphhtthhopegsvghrthhrrghnuggurhhouhhvohhtrdhpghesghhmrghilhdrtgho mhdprhgtphhtthhopegshigrvhhuiiekudesghhmrghilhdrtghomhdprhgtphhtthhope grlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhrtghpthhtohephhhorhhi khihohhtrgdrnhhtthesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrg gtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 18 Dec 2024 23:22:19 -0500 (EST) Date: Thu, 19 Dec 2024 13:21:54 +0900 From: Michael Paquier To: Bertrand Drouvot Cc: Nazir Bilal Yavuz , Alvaro Herrera , Kyotaro Horiguchi , pgsql-hackers@lists.postgresql.org Subject: Re: per backend I/O statistics Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+l93GRLXykYDL2tJ" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --+l93GRLXykYDL2tJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 18, 2024 at 08:11:55AM +0000, Bertrand Drouvot wrote: > I think I prefer pg_stat_io_build_tuples() and used that name in v11 > attached. I'll rely to your naming sense than mine, then :D > I think that this comment is now confusing since the extra loop would be > done in pg_stat_io_build_tuples() and not where the comment is written. O= ne > option could have been to move the assert and the comment in pg_stat_io_b= uild_tuples() > but I think it's better to have the assert before the pgstat_tracks_io_bk= type() > call in pg_stat_get_io(), so modified the comment a bit instead. >=20 > 0002 is the per-backend stats I/O with yours tweaks. While doing more tests with backends exiting concurrently with their stats scanned, I have detected one path in pg_stat_get_backend_io() after calling pgstat_get_beentry_by_proc_number() where we should also check that it does not return NULL, or we would crash on a pointer dereference when reading the backend type. Fixed that, bumped the two version counters, and done. -- Michael --+l93GRLXykYDL2tJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmdjn2IACgkQnvQgOdby QH0f4xAAqZb1kVaWXqS1vjqu0R9oTiOGIemS2YbOSY7Rr7ukyf70StRoNZBn4kwi 8FHdNUOvTyYnUYimDzGpgP73WQQwahgRY3oan1oSsv3BWZRJ7OWrYwoYRvR6JVAD xXWQVMxo1+HvHdGnBNO02Ol+BGA2tzs+7/v2Jtq8Z0ZAsye+ycakvPJ2eRIXN88R Kev6xl/OfVUgfZ5ZTgBubXXDtHpaMdnoHP3zsvtg2B5n/Il8uUA6w/3G+btR3JIR UAOYTw454XUvLCP7j5cLAGP8nJFAvyYDCKAkjQqMdlL5WxKG7Zf+tvC0t64Pz8eo dQPclt/ueqNY9+ICA14PWgvYFmMsSpoqsw/h+NDO+bA6v0FL3w0mD2nsCsyckDLi 8VkL7eh8e7jm9KWS1zAAggXOvnpU8cdzm8fqxd+Nw8F/VfA5AmoKa4PIVE98uFsd MRY5YIn6CkcbF8tDwiVJfNgIjrGrv2Lv4bd68YP2MwFfkfElLeUfunNaeuMKeerV vmsTh1wnVcYi3KSdohk9Lx2XZGWuNFFSN59A+/wSI7pj6I/GUWBqk3aZOPWCWKOG pOHpKzdwZC8ysBICexyK004Oy/mUbrakf/4PH6oyjp7xl61kOKJ6uwBe2m+DxjEC cHEva/lvOoRCmKiAuICVmxeDr7zgpx7eTYkSJQ8qe50ITkuflfQ= =dFrn -----END PGP SIGNATURE----- --+l93GRLXykYDL2tJ--