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 1wgzlE-006XYO-0R for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jul 2026 06:58:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wgzlC-0050hF-39 for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jul 2026 06:58:26 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wgzlC-0050h7-2I for pgsql-hackers@lists.postgresql.org; Tue, 07 Jul 2026 06:58:26 +0000 Received: from fout-b4-smtp.messagingengine.com ([202.12.124.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wgzlA-00000001yQZ-3ukt for pgsql-hackers@lists.postgresql.org; Tue, 07 Jul 2026 06:58:25 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id E94271D000A7; Tue, 7 Jul 2026 02:58:22 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Tue, 07 Jul 2026 02:58:23 -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=1783407502; x=1783493902; bh=SKJp4644Uq Tn6d5Fp+6Ti3jTVjnnOaJslUdnKre5550=; b=PJnwDb5Bn4X8WF0GKp83WCM9xB gnd5f5CqwtueuwEY8QD4z5ws8HRsDcbzdgWdB0f3+9nV2Xw5vJvC6a9E3gxn89cr 9onL1kuz9HqVvayWSSFd9SxP44UDtnYiKVdbpqokDFGY7z6ypW22dgd+4usIHVAK ifMv4zB6KwTv2nGBgj0sz0Pp5C8u73ppEyPCPnMjMK6YWBrNLaVeRZI1jshpOspb 2ZFiwAdqlTs/O0tPYEVI7ArO1ex+IpguF8A5Z0cDm7ah1e64i7Xs94tc59Tdz/Ws bNuyjHxiCPUATCYIbRwfQ+7M1CpmhR7ZKaUjyC7EB8OEQH3JPQjTEyXG2KfQ== 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= 1783407502; x=1783493902; bh=SKJp4644UqTn6d5Fp+6Ti3jTVjnnOaJslUd nKre5550=; b=orq3SmttU6fuez6renA7Q3BvSGGKrSzZ9MPpWWS1g5AqNTQ1vqg 6lj7I57B6ieENNRQRRJkLGqg0Qd6SIS38HknGNoiyB4qW5zJEKAAXhjDxOGdz+vl bVrK87gRguNqgAqpC5ZAwLnNIuRyLf15vMobNsv81MhJIkSoxELf7oCaFy0eZM9R Dt2urUGqkIluMCS9srULSsgZZjC7h0tNI3tbD936t15vSEDgsLcRYfUwHAnyeNJj ENiHlE7TGGpnJy57o4pBj16S61qP6/ediCebFxEdIoJa4T+dLR5tIY6/wVyi4fy7 nygKUHjs7QLMJAvNfjBb19Sq+gqh4J1kr9g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTF3D5AF2UAe0puIxTXEd8u1T/BDrNyZlXlQYSMqGtBIMDzY8iIDZ3Kz9sgD+6ibPv FxFxH7OzY8BSMxMLwl3K+rOJcQkFUTPwD+zGvDgFEGMJZ+iwPJjCl+L1vsP2d4VoJp/V1n dTDtz7lkc7Ab4Lt8+M8Tw20F00yv8EkXz3D8zZpcpXjZDYqZZ56g/3g2LXC/NQrT5NSrW9 un2wro61o7D9BGwBrGDsDrOyLgS8MnKFhVg0KVzhZo59FvGbxDhibDjRbASCjpP+Hwm8Y6 eIJC2Rd29/DckblofEGdYpUFSQ1bxXR3+KnSbKl3o37tCemLijvCNCIkqR1vyq6fimZmZb Xnye+ci4pGUsBTfoFzqgWNe3nPaqgQT8zSsK/IuyRSmPvhytFHylRJGBcx1tacTvpfgiIF FuWk9rJb93/wSt0GQ4JsTXxMDNosSYSy7mAWUCTHcuBPcnmVr9G1lPNzJoc9MbBNOd1Ms8 5CAcSR72TCvKS0ej2sarPfVc+3pADAQ2aKmQn8zuyWZRo9PQ08JH+4VdsCWQk6KmvKpBmA QUS6Qvk/O6wdx11pVeDSjFJI/k5xLOK1kJqvVjEbKM+IB/C47gDu0Hso14OSSyzukoegOP XtGVHJXAWXeYErR0lIkkG9o138X+rNHshYKmpeGOM9pqwwgL++Pea2sBkVEw X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Jul 2026 02:58:21 -0400 (EDT) Date: Tue, 7 Jul 2026 15:58:18 +0900 From: Michael Paquier To: JoongHyuk Shin Cc: Zsolt Parragi , 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="zVLD23aPq3tu7mfO" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --zVLD23aPq3tu7mfO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 07, 2026 at 12:01:59PM +0900, JoongHyuk Shin wrote: > Attached v8 with the errhint removed. No other changes from v7. + errmsg("multiple recovery targets specified"), + errdetail("Only one recovery target can be set. Parameters set: %s.", + buf.data)); FWIW, I think that this is redundant, as the errmsg and the errdetail are basically saying the same thing. I'd suggest a simpler: errmsg: cannot specify more than one recovery target errdetail: Parameters set are: %s. +# that does not clear another GUC's target. Conflicts are detected at every +# server start by DetermineRecoveryTargetType(). We don't really care about the function name here, just that multiple targets are blocked. +# LSN after the final 6000-row insert and WAL switch. The set-then-clear case +# below has no recovery target and replays all WAL, so it polls on this instead +# of $lsn5, which would race the 5001-6000 rows. I smell of an AI set of comments. We could just remove the whole and not lose value in understanding the meaning of the test. A bunch of the comments added to the TAP script could also be trimmed down quite a bit, made simpler.. With recovery_target assign hook being removed for the case of immediate, a test case that checks for a conflict between immediate and a secondary target may be in order. Please note that Fujii-san is registered as a committer of this patch, so I am not planning to go beyond a review here. -- Michael --zVLD23aPq3tu7mfO Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmpMo4kACgkQnvQgOdby QH3r4hAApx/ZbC3BMVT5mjGmElS1QGRfwnmiZCd2gv3n9O6TlXqc3alud+MSYP1i Fx06Jv4srB4OaETRO1SGfL9/+ZvZZYpgghiNWLBwwj7wBBEmhKc9w/+TENWPYbAw XawoqXXD5DcbiE4bLIhA3vglgTYSl8N8N02fUD2scwT2jtxJC0f2mnigRa8GsCE2 QBQkjIa2YMFaIpXXlT+SJW39TWmuZ4/zcsGrX/dhoLKeWPWMSWOOivVd8suIgVRJ nTkuyYn4+L13BlDJFPXEjQh3pVXWebmU6GQJtbHMJ+iy94XGpP/n/K2YjUzxzjyZ 5WhUzOIaMrGOdQNxnbGrzNag/skq/ZXmDgpECCC53+Bp2vqYNagvnf2JYZ0O6DNy 7lZuh4Oto6dYhnpxOl8i2vS4k8HPdwlLq0JtKC/pq3TUbnF5e1R8ExEGQFhAdyKS XcsBxaCEBUSmcp2b6P9EM176rFqHb7D2MmOnZrMg1FuLiiTvN3J961a/GyZuFz04 9FtPsSanbBWavt/Kd9zgrFLA4xSOoovkhXfiUfKErP8MnwEDgNE/OLJNlPSz85+Q uOaL31jP+0epdXBJtO7BfBH9pJB+cqkEDeTW51UvcZhr/Xu5wOz+umJlTUJt7zNW 2TeULbPdkq9GRBJa4k3vjePpbWaC1Ik5IXPWkIuKzOVpqGACgLI= =O6Aa -----END PGP SIGNATURE----- --zVLD23aPq3tu7mfO--