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 1pggX3-0007Eo-AL for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Mar 2023 06:40:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pggX1-00045B-He for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Mar 2023 06:40:39 +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 1pggX1-000452-8H for pgsql-hackers@lists.postgresql.org; Mon, 27 Mar 2023 06:40:39 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pggWz-0003Uq-27 for pgsql-hackers@lists.postgresql.org; Mon, 27 Mar 2023 06:40:38 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 81ACF5C0121; Mon, 27 Mar 2023 02:40:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 27 Mar 2023 02:40:36 -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=1679899236; x=1679985636; bh=CU VDQdPFuhBrvRwaz6HmCyU7sf7b+upQwnpaJwH1Nt4=; b=s9pvfK4VkRNGpvpGVC PkSIq/WPFxWt5hWyoiblMaMwdhNfdKD301AG0Ydp1jcl1ACeoX+3IqGsO7xEHS0O iI4pCrEwIYe6DwBi3LSjq2ttsK0LxyN0snMBSAMvpj4ekzEdHw4cMrFb2v98A8I9 rzF+x2VsmfaLuVHBLrAJqi/Bhe6gScxnJ/+6TyEtp4wHj31rt2EJaiFjgngvszmz PEtvsIpopGmhxk7Pnvwvd/Yn+tm4PQLeVGpMaX50z/TRCn8Y3QcBtMte3/9nylzN 0HYgIdNfnQUQvTHyk6WzURd7SafWq1n5zibK08aMCG++jICtL3XnLp3g2eNKS8Jw 1FnQ== 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=1679899236; x=1679985636; bh=CUVDQdPFuhBrv Rwaz6HmCyU7sf7b+upQwnpaJwH1Nt4=; b=oWMuBFLjenDX6lTXHeRL2v/SW7OBU 7dcZ3sM8mwyQXYgCgPBsxQk4k+735MYZqP89mHG3oIbjsXeYpwulC4yFICt0JXNP sH8USAY+kKIf8LRFqVykcFc9cjduog+fJnm6ZHsal1Nv/fmQ1o8UujiWS0d6j19l Kd7aFNBmdeLVdMamPICr4MXwZrPfeOP9EvllsJpEOIl0D8QSy+jKlaJKtWjkTCGn JW11LplsiWCFLcPAxb1GtaPYPfoQmETnI4/N5XO8JwCFT0F0zgUvwUsJ7AjCh/Oo q9o1wFFpO0wXlmY5dWeUAa/YF+2braj8LnIKPuYHR1iIK4xpQElq8JfUg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdehuddguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreer tddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlse hprghquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteel geeggeffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdig hiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 Mar 2023 02:40:34 -0400 (EDT) Date: Mon, 27 Mar 2023 15:40:31 +0900 From: Michael Paquier To: "Drouvot, Bertrand" Cc: "Gregory Stark (as CFM)" , Andres Freund , Michael Paquier , PostgreSQL Hackers Subject: Re: Generate pg_stat_get_xact*() functions with Macros Message-ID: References: <20230112182434.ejffbun4plv2g37k@awork3.anarazel.de> <83f7982d-272a-b064-8a0f-8853354edf10@gmail.com> <20230113183746.zyncqr2zz3gk6yh6@awork3.anarazel.de> <11744b0e-5f7f-aba8-7d9c-2ff0a0c6e2b2@gmail.com> <631e3084-c5d9-8463-7540-fcff4674caa5@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9EwoGbpunknpFVI/" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --9EwoGbpunknpFVI/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 27, 2023 at 07:45:26AM +0200, Drouvot, Bertrand wrote: > Thanks! LGTM, but what about also taking care of pg_stat_get_xact_function_total_time() > and pg_stat_get_xact_function_self_time() while at it? With a macro that uses INSTR_TIME_GET_MILLISEC() to cope with instr_time? Why not, that's one duplication less. -- Michael --9EwoGbpunknpFVI/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmQhOl8ACgkQnvQgOdby QH1MqBAAoK/F6IwaorSrSbsSR2NBd925sX5DCfH+y70uXzW7dTQq0nDG1o4i4iWz 9a+A23LPwog1Z9UQs2azrwINUFn/wY5KWmXlZ95AKyVQ9g3SvmRNZsX8NZ2KtL72 zxtDq0Y9Jkws557SLi+4AAWBqaM8jqyZlT+3eMuMrhHcUbkoBhLazQ8EcEUttfE9 Cix1SDEdH7OLXvoSe1LucdjxTPSWIzWipBFzu0AJgO6fIWh7nBbvKg6oKVVFec6G sN/rfpNfgxRhsvosVVQHRS6VZP0EokQEI/oQx2zKd++sHid0H0pJCZ4mN/9z4C/3 zb8qtjoOGq+EJWiSjsSveCs5ql+cQl1BsKXhUObl43+/gWS/gsYdeXkAMxTy+5kA YGSM90GQcb1FLOxzAQB4lAvgowJzZpfBTCH59Ti9d3jlomDJiTdk91bDZ1RrOGpc vnaHciugmGWxQRqpHTFTBl2onrgC7YtCEgtARn++bYaUO0LP0+Dp1y3/Tomnuj6q x8lRF4QXWFcgqbESxMPx8VYQfK513nTJdQ3n6nJqQdzpn80mNJZ8neXMx8dCSXNJ 9caFSLKE/z57j/Ct1dE269yd2pyiKKAvQ3l1nwkNJ1tryhfJLKY+UJBgVsXe2tIh w1xnB63OkNC1FOTg6WzV742C2xMv1mWGxqqL9WJiP2jfP5ZCYzw= =owKx -----END PGP SIGNATURE----- --9EwoGbpunknpFVI/--