Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pfu52-00050H-Tu for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Mar 2023 02:56:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pfu51-0002gv-Ij for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Mar 2023 02:56:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pfu51-0002gm-9O for pgsql-hackers@lists.postgresql.org; Sat, 25 Mar 2023 02:56:31 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pfu4y-0002ak-Qt for pgsql-hackers@lists.postgresql.org; Sat, 25 Mar 2023 02:56:30 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id E775B5C012B; Fri, 24 Mar 2023 22:56:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 24 Mar 2023 22:56:27 -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:sender :subject:subject:to:to; s=fm2; t=1679712987; x=1679799387; bh=NF RAsybvbJ7JIs7Eq3lpoPgFywhf6RSpX7Y/XXcguw0=; b=F53SUwP8gut76meO3m sQ8aDmyIbktpVhIs3SKdx/cPwI96xe0CD8p2cZzflmwOWWbsY9Iui2RBLMX/vbS4 KT8kOvpAvf9jG1uqU6yVSy88QDaLClt7ms+/TElGJ00Cw2ZhfbK4Cbp9WRMixm2T A6Tx1ZZJUH4xYsQFOiE/4wx7Em2ucEU9WXuIfiQKTan+HsDH41+xUXKcmy0ETlHW udWG3CKjRk5WRkH+oVtxOZRNljNM6dSZR85AqyUXoCXTtoxAZ9YEQGuYzxr3Jdpx C67fdCvDm+pi7iI8lI9z6wJ87FbR4B5/NkmP/yoCMLEuLHYwDsCuxUpRy4Ha3OqI 3jsg== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1679712987; x=1679799387; bh=NFRAsybvbJ7JI s7Eq3lpoPgFywhf6RSpX7Y/XXcguw0=; b=NOPWUTLmTfWY3aSDvxsehJqmfYvxR eh54q5bvUmUxdZbCWcAWeMrRlXd7vxzHmQkea5fwfY0xKHs1wXNkISpjDYRrPdRv oAlKgQMMaR+BCJq1fWES56KbiI7MZDNdw7CQv+UpG2mJum59OhUkeyrfQLSCguFe VO/M+KC8cUCHJx2yOFDgqSNs3aYY51sz6d4GRnXFLyf6TfgOhGaRAqdo4sjkEgDx oR1SudwN/XOGZUGTwuXVw78Jm6J+/+YifAXGzH12G4C127F8LdlBhV/GNrofJXcj zCE0PiGwrcu/I4+B7pBkZ4LZpcWk/h7Zdq8wufdf0rAaJiN+WP8FIKXvw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegjedghedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Mar 2023 22:56:26 -0400 (EDT) Date: Sat, 25 Mar 2023 11:56:22 +0900 From: Michael Paquier To: "Drouvot, Bertrand" Cc: Andres Freund , Kyotaro Horiguchi , pgsql-hackers@lists.postgresql.org Subject: Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry Message-ID: References: <20230214.151102.1070436528757437157.horikyota.ntt@gmail.com> <9262b2a9-6785-1f83-bf7f-7fcf90c2c113@gmail.com> <20230215.095644.822493184688844040.horikyota.ntt@gmail.com> <130095b4-7c6d-b6f1-69d4-94f66231f81d@gmail.com> <20230216212121.uvav7xgdh2ysqjy5@awork3.anarazel.de> <621ed53c-4d9a-8f77-ab8c-20235f2d95a1@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yf12ZqtS9bTHz5zO" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --yf12ZqtS9bTHz5zO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 16, 2023 at 02:13:45PM +0100, Drouvot, Bertrand wrote: > On 3/16/23 12:46 PM, Michael Paquier wrote: >>> I don't think we should pay any particular attention to those 2 ones >>> as anyway nothing prevent the 7 others to be called outside of the >>> pg_stat_xact_all_tables view. >>=20 >> I am not quite sure, TBH. Did you look at the difference with a long >> chain of subtrans, like savepoints? The ODBC driver "loves" producing >> a lot of savepoints, for example. >=20 > No, I did not measure the impact. I have been thinking again about this particular point, and I would be fine with an additional boolean flag to compute the subtrans data in the global counter when only necessary. This would not make the macros for the stat functions that much more complicated, while being sure that we don't do unnecessary computations when we know that we don't need them.. -- Michael --yf12ZqtS9bTHz5zO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmQeYtYACgkQnvQgOdby QH0Lyg/+JahYqQhOYsBavOlyB7KOpSzsYVYCFeFIgyHwrUcUGCIW5LJbmJxQADer ICoV3oj3dMbixqEeaspT3s/WvJyNgSU8iP5/3CwjGh1/Q9RRvqQPJ1mJqnCBVXM0 4iCQC/eqAM93xTK2SdVihGQ7N1lrpOmJz4ZG7DWWl+ohe1Hm2X/jmR9kA+tWZe/F J6RA2blaIhv0YoE/S63FyymfEuemSIq4N390piK57AZE5kMAMZUZA3ceulh2kjPg CpD5utZvbZnPrO++F1D6m/KeyI1f3Q0A12o3Gx9L8M3cS/c3sM7fFEtw2ZFXNMgW xy/8vDaO59ISybeZY9Sk90ro5OtmpORbpaWvLymsJDR90mFuBOn3S74a8itKHN2D a8horHgT5onIWAoltlG697FwwXKmKJC1o+zMJfOT8j/seJj9JeHv7f+YY0Y0c0jw 5iXRhcrrB2GwFOYVGVYyyxX8wE6n2Kfi8lh93obHPSdOuuQBHvDitzoN74EbBSnj IW3uE+877VoFgxx/NWK6LfAD36q/hWnQ0SiKon9VYPDocKQpTYPdOuWmgzY+QWol QHiTJEaOhJmb0i/GNtr2qw/T/NjOmhb/xfEVhKc/2ovpDv2wMzlsriHrbA7Rctzf QpCi0NRtREPhUQ8jq+lYbIPJOwOwQffF6CeJHXSxi3OjuEhN5gk= =Jdy9 -----END PGP SIGNATURE----- --yf12ZqtS9bTHz5zO--