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 1wAIrQ-002FfA-1Q for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Apr 2026 02:41:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wAIrP-004Fh8-0C for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Apr 2026 02:41:43 +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.96) (envelope-from ) id 1wAIrO-004Fh0-2C for pgsql-hackers@lists.postgresql.org; Wed, 08 Apr 2026 02:41:43 +0000 Received: from fhigh-a5-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.98.2) (envelope-from ) id 1wAIrM-00000001E3o-0xxT for pgsql-hackers@lists.postgresql.org; Wed, 08 Apr 2026 02:41:42 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id C92D714000CF; Tue, 7 Apr 2026 22:41:38 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Tue, 07 Apr 2026 22:41:38 -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=1775616098; x=1775702498; bh=d4TdVen1ee P6E+hLRI3I6EUo6ISdwfR17JACMErImhs=; b=btX7ej3ZWcgBf4WuyOj20JOGzm szctZKwxDzdiRqqedXtOblYFVYTWIcamAc8aZbGrqsyjQCAvx9WXM47OPe668jLn sXpWMnj4PKNvu2F0zZnk4fzDNI3QmcT8S0mIu0VlGXerzALT4JWcamykME502Myq HcC8G1QLBLsbup/4fsm+ANxdxiIy6yzz4ZxRZna+K0IA2UX1d3TuuUuU913+m+BP y5uuTvo4GDXQZ7ja6zH7Lgl9+9WXgk2hFpIlX/DVtnyKE5R+yceuzrVVudYCRi5e 2D+IgZ0gBcuRU3wPrekwar9o5FnEwwJGlLzdXLGX1bbAcZagJkgXlewtHZvA== 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= 1775616098; x=1775702498; bh=d4TdVen1eeP6E+hLRI3I6EUo6ISdwfR17JA CMErImhs=; b=cTFZ8WigVZ4wgtPzPeiEJ3vddxde3FcmFoKYx5zKc2sVx/oLRLW xtPGn5pE9k4Bqyt3AgUDEkNXmLwYTd7LSWWO19sCGY/nl5k8fjGvfYj6ZDGvAJEY Pcn2wNIj3ZVPw1x33t02FU+7SARqfNicW9AYDJFNK/kgFJJfoYCFUPCyS0lJ8QNO eCU9mIbaawXYG2OtIw00TITRECdh6OAm15q9THIYC8P6tW/kU2mUNd3ux0jfjx4I pQzso4pDe488DQybh4rBLNFCjxIxXT3HcfawKs9Aa5C6uCqnkeOou3cIAxbt0QpI AwbdEITFsXwTjB4fU5r+KLmeTR0ipJ5VSPw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddvvdeflecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlh cuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvden ucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprghquh hivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeggeff hfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhn sggprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegruggrmh ekudehjeesghhmrghilhdrtghomhdprhgtphhtthhopehhlhhinhhnrghkrgesihhkihdr fhhipdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtgh hrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Apr 2026 22:41:36 -0400 (EDT) Date: Wed, 8 Apr 2026 11:41:32 +0900 From: Michael Paquier To: Adam Lee Cc: Heikki Linnakangas , pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] Fix minRecoveryPoint not advanced past checkpoint in CreateRestartPoint Message-ID: References: <038d97bc-fbe4-4d99-b7a5-e468ef361123@iki.fi> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="snGBHSAGDtqXyHne" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --snGBHSAGDtqXyHne Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 03, 2026 at 01:10:08PM +0800, Adam Lee wrote: > PATCH v2 removed the variable lastCheckPointEndPtr and refined the commen= ts. >=20 > Thanks for reviewing. TBH, I am not convinced that this optimization in the control file is worth it. minRecoveryPoint refers to a state where the on-disk pages are all consistent based on their stored LSNs, see also the cross-check that we do at the end of recovery in the event of inconsistent pages. In most cases (say in the 99%-ish range), we will have page flushes, making it non-relevant. With time, I have also learnt the hard way that the less code paths that update minRecoveryPoint in the control file, as well as the local copies, the better. Simplifying this code is something we should try to work on. Complicating it more has less value. If we decide that this optimization is worth having, I am going to request a TAP test to validate the behavior you'd expect out of it. -- Michael --snGBHSAGDtqXyHne Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmnVwFwACgkQnvQgOdby QH3srxAAgLdmdFJT1OUo1Z3xX5eTK0ZN2qMtPFKrZAFvSDwXLsWUxNIaPDQ2hvrm YkuUWgUEuv4UCq6urQnn9v4V1C37mOkxrB8X3p2ZS8ar4xbZE4GTZ5+1wwA2CDj7 M3pfLow9lB//j25UKhZw6AymGoWC1yVB5FcWWFa0hgIF9mPH6DPC80M1E5ACQaBs pYSvHoeSGb3WJB6vzi1MSN4b90+31G3BZRAzPKC1taLIYVUw3djecxqbedguWDwl R473OjV+6gLMQa6F3WyZB0YO7/RwlecMnFyDuNDqR3v0dp9pQqAc+Zc5/zO0ibNi P5RGAAc3py3pdBg18pSEF3ObPLkMs+ruzkQOpn/QI95NWmvHQgeCZG87fVqtdVBH B53yWRTzSvgXo2AcqlVkf2A0xZKr9AnP4flE3CJVV+PbRK9GigQaBRT64lKn4WfV DRBiRu1QN/L83ChfCUtyueHEVGELrgAKeJ/p1ZktYM9Bc66rbLMd+MOhdsvkEqGp c0pBzlIDQG1EOTMbYkXeGEdkt0OFSzLxQAGFpKdN4gFQMmLOWGhVZSorfHiXWNOr g8/y4j6KlCJfIzGrrBj2/nRrKvLA2moqPh8IQb3vtllYPGCtpe46XAbYev9Kznb3 hvwNjkuHr7LEUqMUbnV+lf4oHRw3b0KNNyZbOnJwLe7GcV0v4ro= =UKLb -----END PGP SIGNATURE----- --snGBHSAGDtqXyHne--