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 1tVkYX-00B76q-OH for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jan 2025 04:54:06 +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 1tVkYV-00BsJI-Ix for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jan 2025 04:54:03 +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 1tVkYV-00BsHe-8Z for pgsql-hackers@lists.postgresql.org; Thu, 09 Jan 2025 04:54:02 +0000 Received: from fout-b3-smtp.messagingengine.com ([202.12.124.146]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tVkYS-000fWd-0F for pgsql-hackers@lists.postgresql.org; Thu, 09 Jan 2025 04:54:02 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id BC19A114011F; Wed, 8 Jan 2025 23:53:58 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Wed, 08 Jan 2025 23:53:58 -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=fm2; t=1736398438; x=1736484838; bh=UxAyB8q9Ic kPzIr1WMqU2Y3jV9ZDcr4DhTvWwLajBgQ=; b=bBE4abTVkGJ+POAZyLdRrkdA5b LPCeM68FAYAln/1fdMtI7HFjCzLUIYXlwiTFexFEd9GgXqYdq5AFt9ig4DEEqpvO WJ17PLBJjFUMpABlYIYP1+bWIRj8mrI4BtZ6Rs+3MbCYsPZUjtT9AoKRJxdAC+uA HBSyaFGsHlKyDVPFm1+xYPbUok6EZ2mnyHyJc4v4tX3agUxnNnjSLWzQurE/zKbO OqdrM6tBeGZ4uo+q0wreWaOx+hldWgRvbbNsgkef7ZsR/jQEX5FaVKe3AV8OYQIK LfBkNtFaWUJGo4ZvfyYdcqx7S68+Rx4T3LMgoojATuYM3yBTH3bTSNl5W1TA== 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= 1736398438; x=1736484838; bh=UxAyB8q9IckPzIr1WMqU2Y3jV9ZDcr4DhTv WwLajBgQ=; b=LDcV/wObncTCSRVSGAlvUPn0wFqXYC/R3SwQLsf19mNWOZGbnVp KuaHBv4RjGVUa9Oq3zBaDiP6QJDVcqHaNHbgFhu23zrh53SYWZ1/L18/BVOrspqH JNhTLxkTRCRzHDWIGucxPhVnfs51oQcCZ6rwig955vOV3INo1LV0M6TSVcl37zAm 7t66mHmAw6yEsJSvps9e8RoktK+PphKcvALXk9rO971CT8z0i6aa00ImUUb6HbZy K6V4G/QUp2KRn41l4fQdnOkoLPXNwDJbIyA2UEQjEcczK867JLaat9CoYbR4IwS7 b6gfDVaqsZUOvmoVc3BHmlIYUGuyrdQuMxw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudeghedgjeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnegfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhf gggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruc eomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteel ieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhes phgrqhhuihgvrhdrgiihiidpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouh htpdhrtghpthhtoheprghnughrvghssegrnhgrrhgriigvlhdruggvpdhrtghpthhtohep phhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpd hrtghpthhtoheplhhukhgrshesfhhithhtlhdrtghomh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 8 Jan 2025 23:53:56 -0500 (EST) Date: Thu, 9 Jan 2025 13:53:48 +0900 From: Michael Paquier To: Andres Freund Cc: Postgres hackers , lukas@fittl.com Subject: Re: WAL-logging facility for pgstats kinds Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LC8ZlsvKq1LmyV9M" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --LC8ZlsvKq1LmyV9M Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 02, 2025 at 08:08:42PM -0500, Andres Freund wrote: > I can't think of a real case where we would want to WAL log the stats > themselves, rather than re-emitting stats during replay based on the WAL > record of the "underlying object". >=20 > Do you have counter-examples? I'm not sure if the rebuild based on the WAL records is simpler than logging a snapshot of them that the startup process could digest. Anyway, I've also wanted to be able to replicate stats for historical tracking for stats logged through hooks, and a second case was injection point stats. All these would require registering a custom rmgr on top of a custom stats kind, and centralizing the logic eases a lot some of the sanity checks they'd require as the redo callback of a stats kind can just be attached to its PgStat_KindInfo. I know that Lucas has been playing a bit with the area, and perhaps he has more cases in mind where the replication of stats data could be relevant. So I am adding him in CC. Perhaps I could be wrong, of course. -- Michael --LC8ZlsvKq1LmyV9M Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmd/VlwACgkQnvQgOdby QH0ceBAAnnHLmfotwQpXaLZ64WNUJ/9hlGmHcV25EF8FKKIHoJIcyfKurNtWcmcm IM2hP+JmAtu3seo+ONz2sznej+nKGCMJQkg9IsDB5EtB23JWogUj09fBxJNKb5vx aUXGx1krwRAVp0Khkaz5XmnVILPjk53heqtYOa3VwCkcAPQ7n5yU808yjYM7vZ4/ B/VM2+/djRInYs1SAQl3jECpiPW/kCT8e1eohqPAcaDfNkzT+OjYU1PZMgVGJgSM A3OyzuNfmTZ4N55qjgEAzM+xTyXj4XiwO3Su3xITaKIo1FTwe+FsnPRub0vGazVs QkMH5zZJ9aVHw1nyw6TuCFvRZDcAl8QsQ6U24WKV0xtoqquv5cu8wvYarSYYPG5W +zbODMQ9yw3kH/LMofzk9u3NQRD7Kfz34JarFq5ZqwbHw8ov5JbFIiIWOHfID26y t6PUP9dM6sxcq48tsDM405KkeJk2n5yl+HQoRxN/qd+0/CqgkZd5BBR8CyOpgBu3 Ao8TjY8cGVLj6z1IIdvOib0B4yGviFvRuMN6RD6ih0mAZzZ238TfQlreWlrF4Bk7 Rw9BD3t+2vik5pwRLCAOXy6vZ/AK90Ta+5OLUrR0JF1QGvXtwfgrKrEsVR38zgt+ JPZ3iPwR6085aeGXzlQfS/ga0AyfV9jL/ImknScgiJmFKFvYdDg= =ZC4o -----END PGP SIGNATURE----- --LC8ZlsvKq1LmyV9M--