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.96) (envelope-from ) id 1vTtNH-00DA7J-1X for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Dec 2025 02:59:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vTtNF-006IdR-10 for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Dec 2025 02:59:18 +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.96) (envelope-from ) id 1vTtNE-006IdJ-1d for pgsql-hackers@lists.postgresql.org; Fri, 12 Dec 2025 02:59:17 +0000 Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vTtND-000FCH-2k for pgsql-hackers@lists.postgresql.org; Fri, 12 Dec 2025 02:59:16 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id DD69D7A0196; Thu, 11 Dec 2025 21:59:13 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Thu, 11 Dec 2025 21:59:13 -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=1765508353; x=1765594753; bh=Yz/5K2tVAe Kj7xI9cxwTKiGeGFBP39EcJ/yG4n41/4w=; b=V8DndRqw3+eZeD7v+627ZYXlP2 KHHI/h+B3yh00c9084eWTqApjhlfOBSiMYa9RDTZqy4CoBRwmpbhXJ8BxzFViDIK yUqjo7ramdNPa5CnyPi3yprmCnU0w5DkRapawjIjDmvuxSDW+fEFrwWpMsmE0sA+ mSqImf1peSmV/fptSgHg80jK8KZLCfxGjBwuDZU7J7S7rmTOF0EP30urH2+XkZpM 25ZvUEomk19hV2+ovG0u/qhur1kQA+Edb0rbINDclALNuihJ45iXZGTzGRD7AZlG G1AJ9cCEfYsGmqdoLyBnK4vaM0t6KclqSDONvykeE2bXOPkRa9l5RFb2lsdw== 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= 1765508353; x=1765594753; bh=Yz/5K2tVAeKj7xI9cxwTKiGeGFBP39EcJ/y G4n41/4w=; b=gdQWQ99Oaqrhv9RoTMeRSFeeZkO/Nxg39sWa084rYW67mM4G2xu sKohpG5GjZypP/oM0r3kP3gPA/DC+IIDQZfa+dWjctjB6uBfLIBxNnFsxxGvW3Zp +Vg6i9zYassoGLLdGzDjzqLfCbImuI2cIBUD5fl55CklJqsk0TE1BQHTRfILMGGE oP8dNK+DhU7f8Gs65ItppXuS761HRCnqNTIV5aFPi7aiwU6fAzG7Ar990WCuJVRu HUpGUw3Ba1URLn/sNUgdQw2KKxUCfrsa012SP78r0um3NkSNh4FbWkKpY+oD3i37 jkh40AS+byZoZhFeBE3hxtXfqWvevD6nBCQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvjedtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlh cuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvden ucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprghquh hivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeggeff hfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhn sggprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehsrghmih hmshgvihhhsehgmhgrihhlrdgtohhmpdhrtghpthhtoheplhhirdgvvhgrnhdrtghhrgho sehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhish htshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 11 Dec 2025 21:59:11 -0500 (EST) Date: Fri, 12 Dec 2025 11:58:54 +0900 From: Michael Paquier To: Sami Imseih Cc: Chao Li , PostgreSQL Hackers Subject: Re: [Proposal] Adding callback support for custom statistics kinds Message-ID: References: <9252DA7C-C611-4A93-A484-E6CD42557C15@gmail.com> <4E61FDC4-CFBB-4116-980F-75ADD245A1F6@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1iLSqXB2NZkR3Wrm" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --1iLSqXB2NZkR3Wrm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 10, 2025 at 12:36:36PM -0600, Sami Imseih wrote: > .. and after giving this more thought, I actually don't think we should > do any validation for any of the callbacks. If an extension is writing > to any file ( core or custom ), naturally they will want to read it back. > Now I am not sure what these validations are protecting us against. > Also, maybe the extension wants to just read data from the main stats > file, I could see that use-case, perhaps. >=20 > So, I am proposing removing the validation altogether. What do > you think? The to and from callbacks are coupled with each other, so there may be a point in making sure that if one is defined so is the other. Now, I have never done any enforcement for the existing from/to serialization callbacks either because it would be quickly clear for one what needs to be done when implementing a custom kind. So I'd agree with just removing these checks and keep the code simpler. FWIW, I have begun putting my hands on your patch, editing it at some degree. I am not sure that I will be able to finish that today, but I'm working towards getting something done. -- Michael --1iLSqXB2NZkR3Wrm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmk7hO4ACgkQnvQgOdby QH1lZg//URP0boHtH0e+4l4y66pCBBPYv7H5AyTOyZ/r1Qp1IeByM78sR7R6Q6GH X7O79cxNSlTzvZxXUCuAESusG16ssbsuleD2n9eY3KbuDEDrLYvIOIyr2jOGtLhA y1r3wJskXFK2fd6yyfKc0Ajw2Zn9R6Rjbv2Gu2W7/0QpSAk+Yp1vL3oQET3p4lcW HhH8Ihdc0RaaK0HRH4pR+JzIOT+hg3L0Q6C6iRr7UvByXr9xvW6z+XG5eJ1PPTxZ 9hXxCcSV+JcKb3jqbShdHLq6tvyCvcbFcBWTRKuJ/TWX7rCE3sJgyogd5t72HbkR L+OK82OGqxpTefLNXWI+zW4Gz3zlZODl1x9fEI6BZg2o7uPjJSOjpbjTqOIpT82/ aS9Y3C3HupJZiQaM69YnVwMHXqJSOlm+CbUkaMSDoFdH2UxXMcLOtd2gqrdVC86m BkoGWvHzAKT9qFMdyoDNGOSYU8j9gjNMyWyLxSUxfZI60On5GLYosVUpFs0yk2/n L/KAlJYpUoI81Zs6V1I5e1YpaBD53xqp2XQ8Id21qYUxZxMgjsrEMVS338g8LR2a AUDKIUElA45c3BghHZICWrkQjMhDHHbmc7Evv/0FJOmrS5ZTR9YjszE5/7wT6yCF 1wzyEO63wcIHq6mnLkKmErdLZCym8ji3Vr99kmQ4/cmVsT5fUmM= =CrWe -----END PGP SIGNATURE----- --1iLSqXB2NZkR3Wrm--