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 1vCAlJ-009xIr-QH for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Oct 2025 05:54:53 +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 1vCAlH-00E1tY-CW for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Oct 2025 05:54:50 +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 1vCAlG-00E1tP-IE for pgsql-hackers@lists.postgresql.org; Fri, 24 Oct 2025 05:54:50 +0000 Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vCAlC-003wAY-0d for pgsql-hackers@lists.postgresql.org; Fri, 24 Oct 2025 05:54:49 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id 166917A0069; Fri, 24 Oct 2025 01:54:43 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Fri, 24 Oct 2025 01:54:43 -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=1761285282; x=1761371682; bh=ikBPxVjEL+ pNjWiU+cuqNKLhr/ZOtYwjU/JKK+Elz/c=; b=ppEdEkvwjpmHEMt0QSfDZTEBPk KXZMbl82Av4vcfsxnYvOuleVuH66d11/JRAwPTeabhvs+xGN2GtVgMeGaUVQQygT svJP6GmQXePs8DI/mKH2BInv9jAYd00iLd7Hd45c2F0xOHGkFAQYbUMJlK7ZCq6b xEb8f+HRsRR/cTQI0Eh53Jxs3yoGkIALpUjqaehzYyyw5mpWyZaq7fzNQujR/o1G 1gq8eCRcEftXXKQidmFoJhsGFLTxcOwmRiVpauVhpXgkJMY4vdNZImqbPS+6eXTk 5pKj3zAAW2oLg0L9/PHN8ppLwJHw1eK9nd4Z9iPPJmclB73fit3xqRM6SiBg== 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=fm2; t= 1761285282; x=1761371682; bh=ikBPxVjEL+pNjWiU+cuqNKLhr/ZOtYwjU/J KK+Elz/c=; b=pDtCNJJwWVJNhSsY3I5GGA8rpMxsKgS6YssDf2rvidqsEMoAl2C jVcULAoWcrud1vZeH0Y9DHOv9y4+6AMtwcQvG4h2wTTBfnWsCAHnFxi2rc3nAMAX jVRcwMtZ2Rw2potKy/Rp+oA/HkZFICHrrcKV9KSc7Wem4t7fmK3J/s4jqkrDXjO6 UjoH0aBPGX0bbP3rqA4eZf1yktdIf4Mq7nzAu+73cx9TRppaH0TR8kMgAX5stOJk /kLf5XsdjOWf/JR5uOZDx/s6qcQTXyBikOux0wL4z7qn698UDAhplg+nbrjcEVvz a4vKE6NXb5Q+ao3ev/rjD9sqcTVUSMBkW/w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddugeekheehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshgrmh himhhsvghihhesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgv rhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Oct 2025 01:54:41 -0400 (EDT) Date: Fri, 24 Oct 2025 14:54:22 +0900 From: Michael Paquier To: Sami Imseih Cc: PostgreSQL Hackers Subject: Re: [Proposal] Adding callback support for custom statistics kinds Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iyJwbIUeRgHUKxO5" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --iyJwbIUeRgHUKxO5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 23, 2025 at 07:57:38PM -0500, Sami Imseih wrote: > I was trying to avoid an extra field in PgStat_KindInfo if possible, but > it's worthwhile to provide more flexibility to an extension. I will go > with this. Yes, I don't think that we will be able to avoid some refactoring of the existing callbacks. The introduction of a new one may not be completely necessary, though, especially if we reuse the reset callback to be called when the stats read and write finish to close any fds we may have opened when processing. Maintaining the state of the files opened within each stat kind code across multiple calls of the new "serialized" callback feels a bit more natural and more flexible, at least it's my take on the matter. -- Michael --iyJwbIUeRgHUKxO5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmj7FI4ACgkQnvQgOdby QH0R+g/+O5tJZrN/3Fzy1lbEGhdjRoFLz2WcgvT+7RKhZQAriG1OzHxH5F0H7tw/ GaE6wAG2Ab8+bJVO0X+FFZoJ6Ck247WWnyE9ZZnnELl8DqUSa7meHRU2MOGZERf+ 7epIA5y+r7dLI27hNcSQ8y1EGje/pDD8R3l1E6Ua8ivMK6FCA+nmmH+B36jXM6Tn TySxLNmqBzHOflLNxqaThmUY7xgsjICiFrPOmiAPsLuoe+izjgMLrn+gwMM92Jc9 CFLXztJpOENYITMOMGuPp/s8XNFpd6HsoLangN7Mj1QI1odZ9nHZmiV2BsKPWVfa IMOKb8z8+CwsmpCk06vh6ZN46Wq0xwp/4poWD05xsinON4Xg7sMwYmvkZM9v2gCO x10PMhxwRB0H5/j5z1x43v7FV5wRYKQSyeisCDgITxLwcuX0qbShsL8KqJbzuCPt VkCyEc+IbV0oi/oGT0TthN1IW0IX587lzGzBMGJQQZYQVOvEZllTMUIg7Miyl6Fs PapGaeSg0W/mLYCNxesZan0cNYSXp/PDRx2siMk9w6vRf58ZRfGwfzA874XeoAIS xh6VOUqF8uJl+PqXPxMJgN8H2g4tbgRoPlx2rTTveBTsfx4pFhNjgdykjlF/qwvP ZLtynycb0Z/+w5+GDBp9GuCCmLXb7k4N/2uhh09pC0vfzB3GDQM= =Xz+6 -----END PGP SIGNATURE----- --iyJwbIUeRgHUKxO5--