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 1tDt2C-003qcI-8T for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Nov 2024 22:18:52 +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 1tDt2A-009g9F-Eq for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Nov 2024 22:18:50 +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 1tDt29-009g97-7i for pgsql-hackers@lists.postgresql.org; Wed, 20 Nov 2024 22:18:50 +0000 Received: from fhigh-b3-smtp.messagingengine.com ([202.12.124.154]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDt26-002wog-CN for pgsql-hackers@lists.postgresql.org; Wed, 20 Nov 2024 22:18:48 +0000 Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.stl.internal (Postfix) with ESMTP id 19D482540152; Wed, 20 Nov 2024 17:18:45 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Wed, 20 Nov 2024 17:18:45 -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=1732141124; x=1732227524; bh=fvWYmTlMYT RYK62enEaggvzcqwaXbPmX7QFMhEM9Iic=; b=V76XUEERVOdkr1NBLJ6aTL85kz g4TPBSdcDQTFgl3Bb4ShSOez7gDIimh0KRYGFi3+G0A20BrISMOTqQ9SSDkiebus WHHEmYyBCw7Ya82hk/McfnoU/TqTaOTdH1ueovWYLNm2ivBJoHF4wTTN7pyRwFW8 WcoFn1KFZhkOs+lxHhS5Sz3wy60+xH1/+SUysChJ+1udoFj8lBrU38PWb/LVjmPk +ntEi0gOY1YdBrYttRTFgp+Anm0w5lXjnFynFxanHvLSg4hVW7u1ByvtwVbgLvP4 Qw63IELo7UP7g6iPIB6glfVtcGHz2y87cq56/0gO7o5ilwyxfV5hhxKsVNdA== 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= 1732141124; x=1732227524; bh=fvWYmTlMYTRYK62enEaggvzcqwaXbPmX7QF MhEM9Iic=; b=cLBtCNKPEnggSq6ls8BzhW/79FxcobXoC2qq8U6/nyD6PaHAb2h r/q7jUSRsKfog63+0cLIrRhufqrCb8/1IVRonZqWEt+7NJpW4vRSuQdiwvTSbfWI Ttzn+NBvM+c7nBkwrhMMvVp0p/B9ZxfIRGPrTflAbwHBbFFNH4LKvIAlmfb82pSV TAGFJq4HTij6zlIDDNVo8xWIOlTG1LmLZRq0PIykXhRufhPw5+ELGpSP2BLgHKIJ K6XXWkvVBpyQ3JrMugtVfy4KkdgLEXwFc9J1zjgPT3mLJeJ8wflrNYIFrkIElvhl cFd9frrsLgCViOSxRWzm/JKb7A2WMzdkLjg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfeeggdduheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnegfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhf gggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruc eomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteel ieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhes phgrqhhuihgvrhdrgiihiidpnhgspghrtghpthhtohephedpmhhouggvpehsmhhtphhouh htpdhrtghpthhtohepsggvrhhtrhgrnhguughrohhuvhhothdrphhgsehgmhgrihhlrdgt ohhmpdhrtghpthhtohepsgihrghvuhiikedusehgmhgrihhlrdgtohhmpdhrtghpthhtoh eprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdprhgtphhtthhopehhohhr ihhkhihothgrrdhnthhtsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhh grtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Nov 2024 17:18:42 -0500 (EST) Date: Thu, 21 Nov 2024 07:18:24 +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="gI9c4CbFMUlBTvOi" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --gI9c4CbFMUlBTvOi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 20, 2024 at 02:20:18PM +0000, Bertrand Drouvot wrote: > Right. I did not had in mind to go that far here (for the per backend sta= ts > needs). My idea was "just" to move the new pgstat_create_backend_stat() (= which > is related to per backend stats only) call at the right place in StartupX= LOG() > for the startup process only. As that's the startup process that will res= et > or restore the stats I think that makes sense. >=20 > It looks like that what you have in mind is much more generic, what about: >=20 > - Focus on this thread first and then move the call as proposed above > - Think about a more generic idea later on (on the per-backend I/O stats = is > in). Moving pgstat_create_backend_stat() may be OK in the long-term, at least that would document why we need to care about the startup process. Still, moving only the call feels incomplete, so how about adding a boolean field in PgStat_ShmemControl that defaults to false when the shmem area is initialized in StatsShmemInit(), then switched to true once we know that the stats have been restored or reset by the startup process. Something like that should work to control the dshash inserts, I guess? -- Michael --gI9c4CbFMUlBTvOi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmc+YDAACgkQnvQgOdby QH3RORAAqDG/jo/KXaKzmpMmipTSX5Ig9sm5b7Sv5qsygYZbWpTPvOt/soXR5X8s 4fKtv00aIIzpVzBDziuwgqr7wI5nzspsFWcA/ut5fxs+YbSfFql4nBNwuzvOtqvr 7hxVyT0HyYqnhkrDWNIbVapr8NifmvdgkWNNYVCGh00a1F+hf1qAFhhlh97CsVE+ kgnl8TP5S2PljNwmK9ug65TV9shnI6+xkrBb5i/2a87A2gf9hGdQqjcHss1kcKlo 2ubzGsXat2L70Ith8ZAewv3wJiSRu8yFmjPRz9ZJiOK622/t4B3tPi5uiTVyNiUv 4U35ACksSiSXKbd5lS0LBlD9nKsJGULwU8Gfn9NPqXdeAyTXlEnJuoIjkP7IJ8TI 4LI0AMEdxMoqUfgRjnfLQ0OL6lk7WE7mdkPE4wnNmjYYZ6e1X5ZlRSSZEKGKccwB veGihjQ75DGm21zuMBY15ymsK0Gd0HoSTCBAsMQhdVtULZoBH3ZHflDDORCK4pb0 zHoZRPxBRuXcndLHYSAbRDEzKBCSNcRVo74yLW89kaDzlNGFvPq+15qHV3k+NP1t Yg7HCWJQ+2DT4NrG1JYRvNxlRvt5iNlIg+WxjFHH9BDdrs7/8mcYnusK6SP/mkN0 vs8GFp3a8txs7pSWwKsw2vInQD+MtNtxS1wF8yha1zHv5T82D4Q= =Bz8Z -----END PGP SIGNATURE----- --gI9c4CbFMUlBTvOi--