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 1wcf0z-003WQw-1X for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jun 2026 08:00:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wcf0y-004Pfo-0S for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jun 2026 08:00:48 +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 1wcf0x-004Pff-1I for pgsql-hackers@lists.postgresql.org; Thu, 25 Jun 2026 08:00:47 +0000 Received: from fout-b5-smtp.messagingengine.com ([202.12.124.148]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wcf0s-00000000AQG-2OSP for pgsql-hackers@lists.postgresql.org; Thu, 25 Jun 2026 08:00:47 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfout.stl.internal (Postfix) with ESMTP id 4BF0D1D000AE; Thu, 25 Jun 2026 04:00:39 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Thu, 25 Jun 2026 04:00:39 -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=1782374439; x=1782460839; bh=RYjmB2NVlL zhKWfwpFTrY1X3jn0OjyCcTPrg0ZYQXPg=; b=pTiZgpxq+WCXG4gzPJsUG6HfV8 S5wcM3CMILo9A90+jJ8rDUuJ/IrdnIolKmXlVPOa7cxw1FxGPPj361ahvkoOscMD 77DkHYQFvMHSBAnPCX1a1Pnv6Tpfd1wBI04bkYZjlJ8oPcuTJn6cUmXzlThsXMP7 MNpEuG2wxxBvz+L9nS+rBCk+xQlFnhgM8utQEev1BaUSVUnvwLnSMMh8foMzsEKG mYeG3pqwnrFGogQtwjhYn3rR9pU5QV4EZRk3h7dlwMZBjnxiOOOTH2/UIndy5obC APF+Zl4MyxTNcOA4pbddERPzRgt6TgInPj4FDcvSfsTmEpXpBbsHW5THEaog== 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= 1782374439; x=1782460839; bh=RYjmB2NVlLzhKWfwpFTrY1X3jn0OjyCcTPr g0ZYQXPg=; b=JCGdcos9MZw1bqvcah5LRIBss15ovLEj8HMf6K0YP5IFYtMwzme 0tgHUEfUrYtVgfNF6EzYYYtoJhZjl5Z6VGK7dlS1KTxB5pfWAcXBq0BrDuUOMhJq tQjCo2AFoa2u2XD7AIRgIifsC9G+a+P51+pZOhytiZse2rmD1egtC/LND9718quQ kn4vY7ruBZRdjglIA5RBeOanMq3u9HA2rfmkPHyhVP4sI1IywIexD4ycsZnv4jX4 honkSThmqGEa0B7AE5BWdx6t9xN3LeQTWNyhPehzVxfy4gWOFn2Oj/plhTk0eJO7 hkxKr5C1T45CEz7gng5X9rAHwOWG8YKS8OQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTE2ZMPpWczxRo9CRmY1tZprqd+SeMV9peYttEoKlAjfZrDg5nsaY5izF65RMqBJkU 6ZEB40/zNX1aIxUdJlr7B7i5uudIPGhD+5rZTQjXghQ68Ow3YvOkeoVIzzu0BwVTxzIeg/ 3ahdiAetH1vTVNbm+FuNbPrWFkZaMHUzwgiSrx6Gp6XM3+gnJE993KcNMWk/VqYzo5ACxh KPBPdHRSuvRDUCCnmIGGXQDU4YoLL0w7ciBO6Tt5uYsIXUUnP8XAu/oCzFiafjhg1DCtG+ YRgZIZz9XbtLOdHAXt+aouJvZy6c7JmmTjtbFgaN2fDsgaMZN4ZMiN3XIr3H23wJPvvTf+ CPSSDCWG0TVuSUv5WWNVu0OejiPwvXQp0VUf2WgFQEPBKP59LWUIb6pmr9ya55cCQHA6s/ miUbWb/558neJlrQzMgeci+59ZBp0C5we+iydb9v4ARa4YIrLSeW296Ln6cZJTjHxwgyNQ IJo7CtjvWrG15VrQwtTNr8FgBHa/AIw9mODIFlm15ARYUAIj04NG07PD62bnG50Uig5uY5 zIupOMCEibu6qDSFg4pQTtpqFylxWwdaBP6GdT8G055eyHxotD0LoLBjR9rcb//NtAqHCd UQjZyKIU6vbQTOwqEWkLaNtsrmFlSJG6j8p7stBRug6q+r6RHZUiqWHbNMOg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 Jun 2026 04:00:37 -0400 (EDT) Date: Thu, 25 Jun 2026 17:00:33 +0900 From: Michael Paquier To: JoongHyuk Shin Cc: =?iso-8859-1?Q?=C1lvaro?= Herrera , Scott Ray , Fujii Masao , pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] Don't call ereport(ERROR) from recovery target GUC assign hooks Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YGBSPxgisI4v+V6L" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --YGBSPxgisI4v+V6L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 22, 2026 at 01:37:27PM +0900, JoongHyuk Shin wrote: > Thanks for the review. Please avoid top-posting when replying on the lists. This breaks the logical flow of the thread. > The five GetConfigOption() checks are now a local macro, as suggested. + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), + errmsg("multiple recovery targets specified"), + errdetail("Recovery targets %s are set, but only one can = be set.", + buf.data), Is this errdetail() the optimal choice, though? It feels a bit odd to have that mid-sentence. Perhaps we should use a colon to separate the list of parameters, say simply: "Parameters set are: %s." The trick of Alvaro to make the list of parameters translatable is interesting. Didn't know that. The tests feel bloated to me, bumping the time it takes to run 003 by 30%~40% or so. The "Three conflicting targets" has for example little value. I think that we should also get rid of most of the tests where we do the patterns for "-c recovery_target_foo=3Dbar -c recovery_target_foo=3D", repeated for each target type. One should be enough. Keeping only one failure case should be enough for two recovery targets (or all of them set, why not). With the first tests in place, I am not convinced that the anti-pattern "-c recovery_target_foo=3D -c recovery_target_foo=3Dbar" is=20 needed. Let's just remove it. This code is clearly AI-generated. Comments are equally bloated with descriptions that can be understood just by reading the code. Let's simplify all that. In CheckRecoveryTargetConflicts(), initStringInfo() does an allocation. Perhaps we should free it after making sure we don't FATAL. Just a good practice. -- Michael --YGBSPxgisI4v+V6L Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmo84CEACgkQnvQgOdby QH0ERg/5AfdnHYuAoJ6O6ZRsLXQeMzDbLyFVolsM/qHxEFasjX/AKcEI83REbH8x VIxppwll3ny73LzqZNecrMfucBcRkA3TMqFGvwVeF1NVp10/V1MVF+tTQYPB2iDp QHo8/iMOqF6P66yHz8+ebSF+jKfDXSIBbyF3lD0c/bSSReTHxtnTCNKR0/MiOXq9 Ogm0+au86XmB0AHuNdGvGgjDP7HDzMggI1h3ioGntOElsbr3yoLG9KkN1g/H+dBb zwp1Yo1iQcBqLF8IDyWmsOW/4GzbkMehi7W2PI32DgUsrjD4IzyOT2VkdlnVkxUL igcoDoWgU6kJ+HP5ok5S1f9zDhTqq2+LFKMnShFx/ShrtmZYwj8UGux7qs+vzOyx amzelzudacbRpEY09kMo+XoVz8QHdKyIZxrzMtT2zQi+nqSlCdaF0T00KXx91/Cx dy3vnnZmEcdm2R706Y2HQeBrI6Z2pBpkdCVAG1Okrp3j77rDKpJfztYj7XOCWjwu I/ycKCZXZcurdAu18etYtHRncZleqwe7OYt2NzuuCO65TtHBrRR3ClHqHlWxLwaX BHMKKn9SGlO2GxpD0rmgQQ2A+OugExOToF9CvFpfk0rSfzgz9fiUPokGbsOed3it sbOUZfYkHDFnzUVq7D/Oo05myOIJ2rbLsfqBOj72D4uyhFOp6hk= =ygBN -----END PGP SIGNATURE----- --YGBSPxgisI4v+V6L--