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 1sUIpI-00202M-Di for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jul 2024 04:33:08 +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 1sUIpG-009Ws9-GC for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jul 2024 04:33:06 +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 1sUIpG-009WrM-5n for pgsql-hackers@lists.postgresql.org; Thu, 18 Jul 2024 04:33:06 +0000 Received: from fhigh5-smtp.messagingengine.com ([103.168.172.156]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sUIpE-0008gL-8p for pgsql-hackers@postgresql.org; Thu, 18 Jul 2024 04:33:05 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 40DD111401B0; Thu, 18 Jul 2024 00:33:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 18 Jul 2024 00:33:02 -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=1721277182; x=1721363582; bh=foeFgrmL9X Wi89mBrTqwCCXH/on0WQuLRe8zLocpKoY=; b=NAmCib0Etd4TaOl7HfNmWlyRgz ejqWvKgV15YCiKPMNGmVW9VJYTqYCB0u5ACb902aOOfcnE62f5f1GgG8fCGHDYW1 auiJXUI+umNeNVaEW4n+/zXawhs51wDIukyNuxJMVI7jpnENd/hbmheoohhqUzjB ELWCMfhfYEDrrJHSRvLejlDFIxYDwG0IZGOJQ5s7/Td9OhTf6JHUJgoMQRaxUTVs e8EXhKz3KvhhVvdM6vgGAjdsKd2YnYW53hAu5XciIPmSLKG8m91M03qmpK0V7nGg iDTyJ5cb2Ee+ryZXShTPXBS9/LFHC9QA2SbyPWLEk8cGGa5pI5UdjEeNSQiw== 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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1721277182; x=1721363582; bh=foeFgrmL9XWi89mBrTqwCCXH/on0 WQuLRe8zLocpKoY=; b=iVJS+y7bUOj9DAm4t16NKEUYWZrxiiR/cU8hL3Pmvl9p VvnNhyVwqvcclUxiyllhsIHbKtfX8W9KzxETZWRFz9pZaNjiedY7EVITimeJ0LIl yl8SeBAsTtrZRjtvwLRU22AR5QOGDeonk6DqYI/tR2/rEvuHkrLFbZ9I4hszY1AR ax07uVirG1NuLT/J/aFdnPSvdvLuAZq3mD1nXR9TC7QOQNUkdUmLyOXz2BbLM/RQ GXJ9DWIr8LFur1EVmBg3j1snX9a7pxe8uRRJiTn3VSCBnUL92F/ikEqr41zn3dOn ZcMoRuMf/vMcMijSFYtktVQFFckM208fbYrRxE52dQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrgeekgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeg geffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 18 Jul 2024 00:32:59 -0400 (EDT) Date: Thu, 18 Jul 2024 13:32:48 +0900 From: Michael Paquier To: Joe Conway Cc: Tomas Vondra , Gurjeet Singh , Masahiko Sawada , PostgreSQL-development Subject: Re: RFC: pg_stat_logmsg Message-ID: References: <89742024-d51a-c66b-90b9-67f837072cd2@joeconway.com> <3b1683bc-2630-a0d0-6083-8a45aa1b54bf@joeconway.com> <5dc12198-80ff-4e70-b187-11ef33418411@enterprisedb.com> <12f6d0f0-0b5d-46e3-afa9-c35bd418d49f@joeconway.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dFrdQQN6vUrRvRbD" Content-Disposition: inline In-Reply-To: <12f6d0f0-0b5d-46e3-afa9-c35bd418d49f@joeconway.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --dFrdQQN6vUrRvRbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 17, 2024 at 07:43:13AM -0400, Joe Conway wrote: > On 7/16/24 18:14, Tomas Vondra wrote: >> As for the feature, I've never done a fleet-wide analysis, so if this is >> one of the main use cases, I'm not really sure I can judge if this is a >> good tool for that. It seems like it might be a convenient way to do >> that, but does that require we add the module to contrib? >=20 > I had an offlist chat with Andres about this IIRC and he suggested he > thought it ought to be just built in to the backend as part of the > statistics subsystem. Lately though I have been toying with the idea of > keeping it as an extension and basing it off Michael Paquier's work for > Pluggable cumulative statistics. This may live better as a contrib/ module, serving as well as an extra template for what can be done with the pluggable stats. Adding that in core is of course OK for me if that's the consensus. The APIs for pluggable stats are really the same as what you would store in core, minus the system functions you'd want to add in the catalog .dat files, of course. I'd like to get it this part done by the end of this commit fest to have room with pg_stat_statements for this release, but well, we'll see. As far as I can see everybody who commented on the thread seems kind of OK with the idea to fix the stats kinds IDs in time, like custom RMGRs. That's just simpler implementation-wise, but I'm also looking for more opinions. > Hmm, yeah, I had been planning to include postgres version as part of the > output, but maybe it would need to be part of the key. Seems to me that you should do both, then: add PG_VERSION to the entries, and hash the keys with it for uniqueness. You could also have a reset function that performs a removal of the stats for anything else than the current PG_VERSION, for example. -- Michael --dFrdQQN6vUrRvRbD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmaYmvAACgkQnvQgOdby QH1Jig//bjoqvGEHQwPpoiN+ciEdBBCb992camAxa4xeVFO2HyBcMwDUUP0ROwmD OwN6UETd9HjPhoqaqIGzwMQJeI4Eeotlw4K/333WRuXiODWTsTYMeSzo6qx6R0+1 KqtVcAw31T+VGebzfFRUsnHwu9/trPYKJtLWdRf8bnkWz6pQPb68KdAtJ/YtMASl K7Je5u4UgTyKDsjxqcVrOHQ5EY1UHS6QW+sDvq1Ujtyqns4WcldNrWolJpV/2DGz ip1/EdkU1WYDvM+LeaXK0vLCMJ4UiejcX4BrygieDAMGmrA6rWjs+PWoVZoECTpL qC/gmiT9Y6kny7eXYnkmPtp8cdpVc7+qV/EO0Y5nSamPUkIwZBpmpfFEM0v0RQ9Q 5M0PDzXhU9vH1P3+w7XpgcTIHGFETwUXIFU9q/XZI/4LDximTmtbCeUYTIZKKrF7 i2C7ZII9Af6c67tBbvNb7KpMP3U3T9rpfVnPqUSeuYKps2amBIJ45gi9R0hNIAuz t/Vnj5lNJdYj3GSh/vOwl7ZoFbpnTKAsc2D9AgmCYt77dCKL0Te9dQfuS/MpHMVa PL/VXrB5l0I0gcjbdgHPPOEmylZUk8mhOOBlEfQiLpRueSU56BteX2BAM/cgxuZR 9labad7sYACsm6wEZxH0ob7PqlqOi7dZ1EoEsl8tXeTA4etvlv0= =H8AI -----END PGP SIGNATURE----- --dFrdQQN6vUrRvRbD--