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 1vaQCH-008Aho-24 for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Dec 2025 03:14:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vaQCF-002Cxb-1d for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Dec 2025 03:14:56 +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 1vaQCE-002CxT-2N for pgsql-hackers@lists.postgresql.org; Tue, 30 Dec 2025 03:14:55 +0000 Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vaQCA-003V0q-2F for pgsql-hackers@lists.postgresql.org; Tue, 30 Dec 2025 03:14:55 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id D95977A00B3; Mon, 29 Dec 2025 22:14:47 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Mon, 29 Dec 2025 22:14:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm3; t=1767064487; x= 1767150887; bh=j6935cLhWWLkCpN+ESS8Azt/QvZzX6vSKVAr+8k/zUs=; b=k Z6sLTUEjRMWSI2i/B8IDcNEIm/qzGW5MCuxiNmZVC2nAhNDE61hR7YqcInUOMGZy TveY6dl9LQiqx4oM9VejP9BD+ZJWEcmOWgoPnayenf3zp7SlBofjjx2tiH8yx/+a yuw1PoRn0ql9OXqh0lhUffNRScXPoyZCnQ/jW4vOwz8UQPwRkjTqbctievIMnjmT 8za1Q3gDEXAJCfQdw70l1ooSIrWAtARGm9+sXRBwps7+9Jnj1SThRZigC6vf0JZM T4NSmTleO1dGAhY4jNQE7IVPPdIBjB863eFxgxSsB47u8JzP0oKGzEthAJoT4zgj 4IYt4hpBzFaJ79HK+nL/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1767064487; x=1767150887; bh=j 6935cLhWWLkCpN+ESS8Azt/QvZzX6vSKVAr+8k/zUs=; b=EuzBJEZlxogTwW5tL 9sK23bLoq6QEJjm87rIc/KruVTeqm5a5h91XKj0sy8wgm43NRTxwoHyb8UV6hjQA iTIgo4eQvOgMPsiwZ6jnYo+BqZkd6BoFGegRlOsgOuAusD1VrWl8NoA51nQ2bqz3 3kU/wBUMdJNKScpgg809kC84SiNhPpgL17dG5IY39t1wpRHHgZ90H0AK5KidJF64 y121BDPXTbLtgRGzAtQJwhqWzLRltd9PO6+yjNfEA+skefkyScWuGox2DfN8rGxo luvxcI3E4KG1WpEyeO2cRRQ72yu4SrkKaY06jaoFJBR3L1+EQHb3zFmG1aDohigp +8amw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdejkeelvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpemllhhvrghrohcu jfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgeskhhurhhilhgvmhhurdguvgeqnecuggftrf grthhtvghrnhepteeuvdehffekvefgueehveetveekgfegtddtueefueehuddutdfhfeff hfejfeffnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvges khhurhhilhgvmhhurdguvgdpnhgspghrtghpthhtohepledpmhhouggvpehsmhhtphhouh htpdhrtghpthhtoheprghnughrvghssegrnhgrrhgriigvlhdruggvpdhrtghpthhtohep rggvkhhorhhothhkohhvsehgmhgrihhlrdgtohhmpdhrtghpthhtohepjhhirghnrdhunh hivhgvrhhsrghlihhthiesghhmrghilhdrtghomhdprhgtphhtthhopehlihdrvghvrghn rdgthhgrohesghhmrghilhdrtghomhdprhgtphhtthhopeiguhhnvghnghiihhhouhesgh hmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhs rdhpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehmihgthhgrvghlsehprghquh hivghrrdighiiipdhrtghpthhtohephidrshhokhholhhovhesphhoshhtghhrvghsphhr ohdrrhhupdhrtghpthhtohepthhomhgrshesvhhonhgurhgrrdhmvg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 Dec 2025 22:14:46 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1767064482; bh=JK+Ixwjs/MRC6XzlbgF+6KL2X7u2hPc2cNojbDKkpVY=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=4rMtN3O7rEcrhDBUS+kXjYScghbrTMAci3ibcWsBftH4Lqt17b4AsRvQkFJNSaA31 O8l9tflpFwfirfx4TDglkVfnrSG3l1+SfPLZGIOyM6TZnP1Irs2eRwYedXwKSYCHsC VBhZpnjFoFEPxZAMD0/LLYRgeRTrW7X1I+1VmR4IZcfyvtHJju+TLqlPUy82+m7sh0 NimGIe3/Gz4EYOyLlG1N/FvdVEey6SqqZLqn+OTUJ4ODgfgj6eXikxvkidkmRGCcCf e5jp6mvWsPo+xkb32DCY3AGqvqvOTCEGDx6S8rbgz0U0COPy+1+btUBtHJrVqVJMdv 0PcnDu6Tl6OxA== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 8322878; Tue, 30 Dec 2025 00:14:42 -0300 (-03) Date: Tue, 30 Dec 2025 00:14:42 -0300 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Xuneng Zhou Cc: Chao Li , Alexander Korotkov , pgsql-hackers , Andres Freund , Michael Paquier , jian he , Tomas Vondra , Yura Sokolov Subject: Re: Implement waiting for wal lsn replay: reloaded Message-ID: <202512300309.ob42gaafej7v@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Dec-27, Xuneng Zhou wrote: > On Fri, Dec 26, 2025 at 4:25 PM Chao Li wrote: > > 2 - 0002 > > ``` > > + else > > + ereport(ERROR, > > + (errcode(ERRCODE_INVALID_PARAMETER_VALUE), > > + errmsg("unrecognized value for WAIT option \"%s\": \"%s\"", > > + "MODE", mode_str), > > ``` > > > > I wonder why don’t we directly put MODE into the error message? > > Yeah, putting MODE into the error message is cleaner. It's done in v8. The reason not to do that (and also put WAIT in a separate string) is so that the message is identicla to other messages and thus requires no separate translation, specifically errmsg("unrecognized value for %s option \"%s\": \"%s\"", ...) See commit 502e256f2262. Please use that form. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "El sabio habla porque tiene algo que decir; el tonto, porque tiene que decir algo" (Platon).