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 1vaQML-008CsE-1H for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Dec 2025 03:25:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vaQMK-002Gyq-0F for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Dec 2025 03:25:20 +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 1vaQMJ-002Gyi-2X for pgsql-hackers@lists.postgresql.org; Tue, 30 Dec 2025 03:25:20 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vaQMH-003V5X-31 for pgsql-hackers@lists.postgresql.org; Tue, 30 Dec 2025 03:25:20 +0000 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-bf5ac50827dso6118046a12.2 for ; Mon, 29 Dec 2025 19:25:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1767065116; x=1767669916; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JgAquN1dSk1jMaQWKuNOeiY7tmn7Z8OAwhMjSzf9/vI=; b=essTMdrqussiWA/ZJ+iWVK6kPzUfdZMHPfPoi2MvMsewBjve9c2tsjKZMk4zWR5eS6 FfF2rUgFo/JV3CHp13YMzQkcDlt7wVfUW1NGnhk+H+GgpibUxQvB7HEtAA3d0cUbD8xx 6oXlEDLVnvyCS8cBnGUlWNUNTvIYKkdQ007e18cVn3FoCO3m7US9pjZzVYGiCl7IxA2/ LGMS3MYk7/n6vJ80H9mmBgoDfHEFMrlzv9P6A+FTQNCClpd2bQ0B/B9Y+gBqKMRU85e0 DwLxs8w/TF8CPFmoWMIqf+JHUjX9GHPEddz8gRFC2EXm9piR+ipLNfA/QHw/3A8q0YIq yyng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767065116; x=1767669916; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=JgAquN1dSk1jMaQWKuNOeiY7tmn7Z8OAwhMjSzf9/vI=; b=i+P1KH41mVlnOd81oCQ6stkSsQCmiGg2/xLVrCmXPUu9C4dO8WiCP41DCBR06fpy+W 4X+CBZNFgrfSTGx90PpZztVV/O61JGfvjU6UFFKRqqHgyZzqkc56jA88j29UuTscxg2J P0uTS9WMj32PZA1Y3HIllwIQSiuUcpomn6DD+ExYQ+N2iDIgRVe5rdh9CyDapYcMboaW 4xhQpH27uuryvAhX82bcyZHG9M/Vaci7jd8uHcS2oKaV+VLn9K0sPCxcAmueM2IHq7Oj SVGDLsmKyIhrZRzDr3Bw2mm4+gR9Uvi3d5Kjn9I6SCOm/F3kzNxD6+y9DdXs1C5XDaJZ wqMw== X-Forwarded-Encrypted: i=1; AJvYcCVta/ZWWnkbezwYmXVMkDnfbV4Qm8AoDtvcKMx1BTHHnCDlCIzX4NmofbLR42t9i3g+8rk4TaWuIh4eYDN9@lists.postgresql.org X-Gm-Message-State: AOJu0Yxgh67isJLDEtX0E82IDjNNFgxlwUSKWd1VyFRqq+zhEjdsmI+R OnlmzT1dHDlxdM+Mew+DBNwp/3wQN09+h3duuKW5Rjj/I1f9GlYTbMoY X-Gm-Gg: AY/fxX4AJngtxFBSIsbpw8MNPM0Q8CnIbdB8xTgoHlywnAGFwSWWrZnfO0Q/o6xWikS 7M8WBx6syrUJWOGnMoTnBFBGy0fuD5j8GZ3vHm5rATrrUiJuQfS2O32zsQmQ0MjAuRbach4yyi4 V1KZblJ/eT3uoGLRahSPRtHUrHefuMVETghAovnvXVjNKvDRuSJDiPPmbJCDaW3Of9+GhQtA3y8 2HxwwepWTQrH2kenjk0fv5fZf61kx9REKH8eG3PeUQOs9ZhkAMaGB1CS12csv8daZIC+yKA6Rw4 M34bEhUSueN27FNKaeqvKkUYfu62VlcZPZLlE8DngJW6T9glsa1ZMIiuq+zChPPyJBThscY4WoY EKVScci/iJxqjpxdw1bfiZLYEUaUUDtP4BRPk7Ri6HTxjKXTZ6McdNEgHJ2lMIpW2hKwKGUR5sv B7TLuMwvvfSXDN4++Z4L5ugHO7dAtgijI= X-Google-Smtp-Source: AGHT+IHEqG+/M6KWQsGcCeH9FpUozGdxMKkdmRy3NXt1Po37WKnUAv5LHrshPmFMJrR5TOxVQnreEg== X-Received: by 2002:a05:7022:f007:b0:11b:9386:8271 with SMTP id a92af1059eb24-12172312791mr27174480c88.46.1767065115730; Mon, 29 Dec 2025 19:25:15 -0800 (PST) Received: from smtpclient.apple ([142.171.105.12]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1217254c734sm126536367c88.13.2025.12.29.19.25.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Dec 2025 19:25:15 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: Implement waiting for wal lsn replay: reloaded From: Chao Li In-Reply-To: <202512300309.ob42gaafej7v@alvherre.pgsql> Date: Tue, 30 Dec 2025 11:24:37 +0800 Cc: Xuneng Zhou , Alexander Korotkov , pgsql-hackers , Andres Freund , Michael Paquier , jian he , Tomas Vondra , Yura Sokolov Content-Transfer-Encoding: quoted-printable Message-Id: References: <202512300309.ob42gaafej7v@alvherre.pgsql> To: =?utf-8?Q?=C3=81lvaro_Herrera?= X-Mailer: Apple Mail (2.3826.700.81) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Dec 30, 2025, at 11:14, =C3=81lvaro Herrera = wrote: >=20 > On 2025-Dec-27, Xuneng Zhou wrote: >=20 >> On Fri, Dec 26, 2025 at 4:25=E2=80=AFPM Chao Li = wrote: >=20 >>> 2 - 0002 >>> ``` >>> + else >>> + ereport(ERROR, >>> + = (errcode(ERRCODE_INVALID_PARAMETER_VALUE), >>> + = errmsg("unrecognized value for WAIT option \"%s\": \"%s\"", >>> + = "MODE", mode_str), >>> ``` >>>=20 >>> I wonder why don=E2=80=99t we directly put MODE into the error = message? >>=20 >> Yeah, putting MODE into the error message is cleaner. It's done in = v8. >=20 > 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\"", ...) >=20 > See commit 502e256f2262. Please use that form. >=20 To follow 502e256f2262, it should use =E2=80=9C%s=E2=80=9D for = =E2=80=9CWAIT=E2=80=9D as well. I raised the comment because I saw = =E2=80=9CWAIT=E2=80=9D is the format strings, thus =E2=80=9CMODE=E2=80=9D = can be there as well. So, we should do a similar change like: ``` - errmsg("unrecognized = value for EXPLAIN option \"%s\": \"%s\"", - = opt->defname, p), + errmsg("unrecognized = value for %s option \"%s\": \"%s\"", + = "EXPLAIN", opt->defname, p), ``` Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/