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 1sBey3-000VCp-Bf for pgsql-hackers@arkaria.postgresql.org; Mon, 27 May 2024 18:21:09 +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 1sBey3-007TvJ-DN for pgsql-hackers@arkaria.postgresql.org; Mon, 27 May 2024 18:21:07 +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 1sBey2-007TvA-57 for pgsql-hackers@lists.postgresql.org; Mon, 27 May 2024 18:21:07 +0000 Received: from fout5-smtp.messagingengine.com ([103.168.172.148]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sBexu-0013V2-4f for pgsql-hackers@postgresql.org; Mon, 27 May 2024 18:21:05 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id F3733138015E; Mon, 27 May 2024 14:20:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 27 May 2024 14:20:55 -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=fm1; t=1716834055; x=1716920455; bh=bdOF0HOG6M //qRjr2fg8Un2Xil1ZV35WGi6josYagqk=; b=WK9QgV77xkRH7l22QG3PjzeZ+r VSj0wZwXZGZvu//xRXMTHsfmBzEbJcXIsI43zgWbkU0mhIuZegZEhBuS8WEsscuM MxxW49oP4HpjwDG7jxbEUGRnSoLHboE6ZSXN2LX5RBaGlI0+ufPbQV1T7+QSjfVx nexv5TkuSG3R9MvIUTrhyQkrld+FKwyvnzrFl0qhOG9U1CIYsXIqLf+XtkEjXXB7 ulA8z4+JL9HEtqzKbhagVqVDF0Aqfr2NnQkHMsHaLRwcdT8KMeOICBynNk/t32AJ bsTkBjGlRQ33ZiKJENFIwdNe5iif02BZ4kgrZ2aoguQffUT9Z29nIjsRgGNw== 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= fm1; t=1716834055; x=1716920455; bh=bdOF0HOG6M//qRjr2fg8Un2Xil1Z V35WGi6josYagqk=; b=SnmwznbUQwH60XVXVEZlaBInf/R4LsbCdqTPxUB3Lq76 KD74u4QagF3w1uQhnrrUSEO/reU7R2/Rfq4Q9WuhXOmUdcxannvrnXr79x62OESD A31lMnaKDDwUUZ5E1fm8y3AthiNh4Ms2xyN2FeOO7aQKgOvX6qK7urxOmBDsPdYm +qEoH6UZvL6+u+FEPEzh8WREilZCnLkhYWhaXtgxcaCdcAPJ6uP6F5Ta5TAIt+R/ yOIXejIH5kTLsdPVRv8ozvMXvD9ywj9HA8Djjt5x4DR3cKopnOxyuxHxHo7ndOBX xaMBS5GLsqIbci0u8dxxXZQbHJjELMHZvsC2Circ1w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdejgedguddvudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdefhedmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreer tddtjeenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlse hprghquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeevteejgfejveegudekheei ueeiueeiveeuiedugeehveeugffgudeuleegleeiteenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdig hiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 May 2024 14:20:54 -0400 (EDT) Date: Mon, 27 May 2024 11:20:52 -0700 From: Michael Paquier To: Robert Haas Cc: Jeff Davis , Danil Anisimow , Andres Freund , PostgreSQL Hackers Subject: Re: Comments on Custom RMGRs Message-ID: References: <0892cd00635c8bcd458de6d43d31cf61953da1b2.camel@j-davis.com> <727b0f3b48aec2a4f968bf11c6fa8ca6382b6cca.camel@j-davis.com> <22e756affaad88b77a52d67cb532ed2a544f2e36.camel@j-davis.com> <1e2256b744836aeb485c61954e9d8272f80141a0.camel@j-davis.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MjzJaJb5kI5yZguo" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --MjzJaJb5kI5yZguo Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 17, 2024 at 04:25:15PM -0400, Robert Haas wrote: > On Fri, May 17, 2024 at 4:20=E2=80=AFPM Jeff Davis wr= ote: >> Regarding this particular change: the checkpointing hook seems more >> like a table AM feature, so I agree with you that we should have a good >> idea how a real table AM might use this, rather than only >> pg_stat_statements. >=20 > I would even be OK with a pg_stat_statements example that is fully > working and fully explained. I just don't want to have no example at > all. The original proposal has been changed twice because of > complaints that the hook wasn't quite useful enough, but I think that > only proves that v3 is closer to being useful than v1. If v1 is 40% of > the way to useful and v3 is 120% of the way to useful, wonderful! But > if v1 is 20% of the way to being useful and v3 is 60% of the way to > being useful, it's not time to commit anything yet. I don't know which > is the case, and I think if someone wants this to be committed, they > need to explain clearly why it's the first and not the second. Please note that I've been studying ways to have pg_stat_statements being plugged in directly with the shared pgstat APIs to get it backed by a dshash to give more flexibility and scaling, giving a way for extensions to register their own stats kind. In this case, the flush of the stats would be controlled with a callback in the stats registered by the extensions, conflicting with what's proposed here. pg_stat_statements is all about stats, at the end. I don't want this argument to act as a barrier if a checkpoint hook is an accepted consensus here, but a checkpoint hook used for this code path is not the most intuitive solution I can think of in the long-term. -- Michael --MjzJaJb5kI5yZguo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmZUzwQACgkQnvQgOdby QH2nuA/8DRVL+I+5di14LoJgwskLhGgzivEW5f/MDugVWQFw6gdHI2x4h4sWpsgb yX6tl0BEYV3HZUfsATKcorxwBLA6jQZpIJrYcjlzEChhuyZr9Unn0FVIads76Shc 8k/o9zIonqihokLwFTxNdOuNxSbIl4t1vmidUcpfGR59TlNs0j1HZbYc7AF0GwL6 Vbw+t1JJZCQ+ib+LTEX4VcNwy/nQe4AiLedFgswvHAQ6TfI2baE4uCntqL9MLobJ JR7AC/WYJ780NgwW1nmYqRnb5yHBJdfx9XNK3Kj7O6uG/RAaru5je/sd9pzrZREB L1cjw+JUmXC345PBpkD7fy9Y2DmZam5aZeTDnt0hD4jKJk+ug0PGbBXnN3hZRcQy stPdKqOFuZ/I5I/FJTcEA8RcuHu/4NiZbYsGZf8QPqofGjTZJaOACEAKiYz6XwrV lf5wQ7I/Ksv6IabfyH1xVVcQzcO4FzsUj2ZidhJtH4svK+p+MdgjU4uIX0+H1c/I Dzr3r/2YzqWHGSYoJoUNLTas41I6DFUgsYBvAcZJq6XJ6x8cC3/R1iJgui+ZBK5G FQDf8efw3igu4Hh/HtpE8IEBcNv8xnrstOcpAOuvk70Z+kgAGSvCemRlyjcnnTtX xZwVvcf30hLujvMVjpNhE+ERPowQcP4xUGmhMjfEhMcxu4A/aRE= =PTzi -----END PGP SIGNATURE----- --MjzJaJb5kI5yZguo--