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 1wgzmJ-006XYo-2Y for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jul 2026 06:59:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wgzmI-0052hT-1c for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Jul 2026 06:59:34 +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 1wgzmI-0052hK-0j for pgsql-hackers@lists.postgresql.org; Tue, 07 Jul 2026 06:59:34 +0000 Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wgzmG-00000001yRS-0vaJ for pgsql-hackers@lists.postgresql.org; Tue, 07 Jul 2026 06:59:33 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id AA68C7A01BE; Tue, 7 Jul 2026 02:59:31 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Tue, 07 Jul 2026 02:59:31 -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=1783407571; x=1783493971; bh=nFHomuRFBz fjTu7jJ24HmHmBr/4374DL9ckIEKL4Xlo=; b=LczpQ+9Zw7s9zczd+oTyIS2o8K Rz9+ZP0Gj5GZwDkt1dC8dH1UFlqc+vTKAKNhEyA9z0e41jQJI7eu8qNCTdOeaALy +hUiPZ+W81ral3Lixz3kATxuujg9+VXMSzhoCMgPiYeljhp8/tmV24ZmlwoEivbV ZHkuVGWpv3Apoi+eQxHvdA0GzGx6MuKMa6BuSW5cPhx3Dybh3qy3tSqhvkZChy3Y d4LqzxmHCulq6UyW99v5KQK6kSHxLE5YDRfFkzZ4y7HqDUjGwo2WPV0SU4zRmi2X 60vWadpmBbLzANnNBuu4EYZo/zZMYnt2BC8/VnX18RYZPsH4w5qFEsS3tVwQ== 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= 1783407571; x=1783493971; bh=nFHomuRFBzfjTu7jJ24HmHmBr/4374DL9ck IEKL4Xlo=; b=gXS4iq4PM3J7Z6EiKIGGO27eM6lKgZfMHTqa0kFTnyocgQrNmzQ L883TawnNBMpE2GSyRQsl/fatphbSxx3ygL/HS4pFhnGhplVkdoZSwuIyailSnEJ SvA3kkD0LU+1r/LroUsg6AWvOMScpc6Is3bgNFBtN6e0fspfxv1V5sDMigZtVTPE V16X+IS/oFDy9/SM5hUKCumftIt0CP3Q8mTXvux5slb6fNbyHc/0nOW+9sEg1qdl xdja1mZgpFTMVSHDFoQitdGJvvyFAcSUpLCPI8tf/jhrgw4eMXLnGwGibcV85PxI 7V28oAFd5tVF8shp/mP50rXbSaR8Cb33+Tg== 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+KnSbKl3o37tCemLijvCNCIkqR1vyq6fimZmTn 5bvh5Oe5PiBDthagC2Usp9LGwglEuTNigiZLynwRTwGIS2R/CAzjqbfEgtVyD8Stxdo1ok 911HgTbGWlZUFRJ71UwwG7Zzg4k5CiWebXRFgWWA+/JiDOrBvr/vrShCxeH+PXKcAfr6iT 2AYg2XWsrAb0j4YG9jY2bd6QA8x83v+9ycrLbVjUZShje13PTojDNY1HgYFPRjr2vzrwck dCpWbBCAHsnd/yBa5KS2QaYmIbB0GZVFemz8n/qQgRtucNRddZhesclJSUJoTxLwTpOufW rr1ym2CpHK/4UzUKDRlb8S/9cy6C/DgdsAEABjF5v+/bc9F3F7+lkim5Sfhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Jul 2026 02:59:30 -0400 (EDT) Date: Tue, 7 Jul 2026 15:59:26 +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="ERACFSvsnKtcn5gC" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --ERACFSvsnKtcn5gC 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 --ERACFSvsnKtcn5gC Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmpMo84ACgkQnvQgOdby QH2BrxAAo9rMHAqo9h2sZaK9K7hhFrerL3yh66ascG5JaekfD+OLjOMUpeiJU16z E++hUlLo0//VwEbtyzX6s1hbSk0GZoAecPWp2VgSS+oO7BWnbVN4PkHij/c60ZIc 8sYXA3b2OyKZXnAYaMf/6pO7T+CSEPJxJgv4fyb7cXtljUeWDv4yYDCHaiuNgBT7 I8DED6YS5ZIdbx225f5gnEl9b0TJV8W7t+Qtoo+Gn1OvR62ZhcQTfwCBGnOlTdwF ig6+BjVICZTnd12xGIcSKrz1PmTHpMpKUH2bsaxW59hcRYuazyZZXrkxyoyd7djY CfYuE5jJQ+6ALcT49CceCrAAJdiDnhllixI3bsbSI1gMje3w34hXQjjiSdslamWg dpt3FXZYGEhH51FWsNnauFz5dV0aQmTH1c/YxdnV7mljb9lFp18gBAgnTpJPH8s2 Ct1pSW9ZdxO/Ecg1x7dhzl7Oblr2zNQ8z2CRkSu31o+63CD+oGO+tyA56Ed/KMTD +rOsjvR8P5rf6QD8OmcifIiZGY40OjiaT/+zhOiBNZg5yPMrP6oUk/ooaB6uI/y/ mXZXGd7E3Rd+I5S4x4hEbMT5ZOZm/ylGNo+5DHw+Y5led6hP4fw2BEoiGBlcYl6t 8N4cnEufqL27sfbwnalACTZ7Qh79kxvD5a2TzL3LGYqSZVb9TBA= =KOWi -----END PGP SIGNATURE----- --ERACFSvsnKtcn5gC--