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 1we4qp-004Xhi-3C for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jun 2026 05:48:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1we4qo-001JXe-1W for pgsql-hackers@arkaria.postgresql.org; Mon, 29 Jun 2026 05:48:10 +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 1we4qn-001JXP-1A for pgsql-hackers@lists.postgresql.org; Mon, 29 Jun 2026 05:48:10 +0000 Received: from fout-a7-smtp.messagingengine.com ([103.168.172.150]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1we4ql-00000000iFW-1PqN for pgsql-hackers@lists.postgresql.org; Mon, 29 Jun 2026 05:48:08 +0000 Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfout.phl.internal (Postfix) with ESMTP id D3C32EC00C0; Mon, 29 Jun 2026 01:48:05 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Mon, 29 Jun 2026 01:48:05 -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=1782712085; x=1782798485; bh=RnfLlCYd9z 46Yg9y66IRgmuD/q6y7DimXdZaDUxQmyI=; b=JUlKXmoD/0xYUAC67KeD1pT2xQ w5MRqDP3i6hwluR6e65qe4dQB34IYwUOrA/5war1oTxEuLANwEyxo2QBDVBvEQmX u9arSR94x4tGrBPSzDGg1UWN6C/ymbeY3y6k89hcNDL01+8keMSheSJSJiywCTmJ FLna++LXZZDwCFZ8r0sMhQqRF4FwSmuDMEitQYYPX/3N2ERafMxa2fwHqxfAY3AQ ZiXp1pOyepwdjOSQX17icLWgBqnPPjTCmmuC3QPZDfo8dmio7CM6+ZKqSxpZfOc9 Oci2ucjmKmXfvgFCmpE2ISFwzUXjFJ8yqfvu7UgF0XnDQxxkIs186GZE2TAQ== 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= 1782712085; x=1782798485; bh=RnfLlCYd9z46Yg9y66IRgmuD/q6y7DimXdZ aDUxQmyI=; b=KEtaNuPtkoVc5cpd7Jtw53AFLMMxq+P3SMsl/fFapWQQZo4XKv/ z1IjmrXzoG09AC9sGUxP8qhWxg8qJ6cdG3XHCpsfoeiMpyCnPYIHnNqvJ9Qmxx0E pK+SE5DczXz59VW5T5Rg8rC4K1eJ8iQ3k0T7k3TMbWVb3ehufRG1fZFWFDQCKeZz M6AovczoKvpl/rr/2261AADsAdSMA753HHHnRKSTZAdEkqzu+VC7H1oNLRdvKNHf P8WzN42XE64JYNYGl3z8NjcIe59UzV5RFpla8nxPZdlHKfGDorv4s24+LefhzG/C gLFZL1WnsnEs4p+2isFofojVTlr8CCuW83w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTG2mVvTK4zSzVT7qvXc+efAQ/l2vX6iAhG7RAgXSLVD1hWe10RzV4n5wrbHsBbHwg 8OXkpO7vM3f+YSxQzRPceDJ6oIorC4ZFm+xy8fLjPMTQcS62CpWyDs5qg05oZvgkUesWuW diSpNETmSjSlWpTzGxeicSFbd3ZXL5P1/PFxANirYfl2hk44mZh5SwI+XKshA4fu/DA46U j+cVrx92yyU5Lv82xayV9MN+FMenVg7RAlxuTMMfVfFzf8cL6lHQco52iUC/d7kJq7/Gq3 JhkV3qh0NyJ4tjO9GOUnRVYorFBRqxeXd9IRzsS933OLd1U/6dP9+ZMKB33VVQLUrVs5Cy 6ONyeNOptyhwLaUbXgVhIhFuSToDF3umLjPFSoZQKuKO+mnlMErYIy/N+3a3PlYv8goqy5 614YHWLkqfoGlVmCHuFXpNFalx2fF6p5o+VC8szwAENw2uvgXT9kcg+0Z+dAG2c1QjPE4E 3b5g9hux9+ImsQhYIl6hMtKVyPzYh7tyczaYtoletdPD4ktbr9Y3QFpVdh4ah6sMGtPP07 THjy/QVtKfWhCzMXuuDuK+ZfOStlvQNIcXKiCoLlnkFiS/for8WEldeRs3bA1ze3EoK6gK jymGIxVK2bV75fui/fnvGkKWM/wh3eBig30jsVSUmCsCHMdTg3VGA7rTNHHw X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 Jun 2026 01:48:03 -0400 (EDT) Date: Mon, 29 Jun 2026 14:47:58 +0900 From: Michael Paquier To: JoongHyuk Shin Cc: assam258@gmail.com, =?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="NVjeOz81ex3CWXfn" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --NVjeOz81ex3CWXfn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 29, 2026 at 01:45:37PM +0900, JoongHyuk Shin wrote: > v7 attached, reworked along the lines discussed. The assign hooks > no longer touch recoveryTarget; each just stores its own value, > and recoveryTarget is derived once in validateRecoveryParameters() > from the settled recovery_target* settings, > which also rejects setting more than one target. > The v6 review comments are folded in too. Hmm. One aspect of the patch that I have a hard time accepting is this aspect: ADD_TARGET_IF_SET("recovery_target", RECOVERY_TARGET_IMMEDIATE); This part lacks future extensibility, IMO. If we add more values to the GUC recovery_target in the future, we push down more complication to the resolution of the immediate target at the beginning of the startup process. Decoupling entirely RecoveryTargetType and the types of values that can be assigned in the GUC recovery_target may lead to a nicer result, I suspect.. It also feels wasteful to add an hypothetical enum for the supported values if we don't have a use for=20 it yet. Any opinions from others? + errdetail("Only one recovery target can be set. Parameters set: %s= =2E", + buf.data), + errhint("See pg_settings for the parameter values and where each is= set.")); pg_settings is just one way to look at these values. We have also SHOW and other interfaces. I would keep the errdetail() with your first sentence, make the errhint the second sentence of the errdetail(). -- Michael --NVjeOz81ex3CWXfn Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmpCBw4ACgkQnvQgOdby QH276w//XgsGk4rPXtEgBs7qvQ2pX67aZH+6Prey8XhWqqdxg4xQIk5FcNBnm/lA Axsfkux1YTM5vPQrn85NVMlAD2fp99Gb+b07L4HF5qlAhcNk2dvEacINW5VRo7TM y0UWzyP3Uiv0oCxhfngKrPpzTn9qQNE/BGjDU42XX2xMUD1GoZyI+AAEKfNPT2gw KU41M7pfn9cWErKoK0zIKwAYdpl8qVH0eNYcO81KuggluvEOUSEXIpI6NsdQmq94 ERolFcocxQne3NYzCTOUm/2hfVe5UXB5CdHVfqAUEl88H4HGBeUCsBfe9aQAi+2Y Jm2T69/EcaiJmI21ghUEoh5y1h6bAS9x07n4KM/dyM7z9YEc5A/FZ2SpEl1aWGTa 9XKi6v06BqF2vQxKt1CP6KPY/piFnoswm6MPQvVZut51GdDX6SFrlGGwdExLOiRd 5KRzU2ZnzREm6R7QPaGPXOgT5LJiidd1TPGYeydxokchUTWdFdiS3W5GKIZF92JK CMGTMdy39uRv8dTPOmYyCraBuYukKTUilClDhsx3Iziyu57Q8CMu8k6BsY3K3Ais ad4X1xQ5OTp0Weah08zStd/UUixE9skCG69/YkSzIZ4X1cPCGsFysO4OyjxIf5Eu TIIeLKalZEqulmC2pOoRYjJ4gOSGACYmf8r5Bh4sr0L1BJ7BwRQ= =LuDw -----END PGP SIGNATURE----- --NVjeOz81ex3CWXfn--