From: Álvaro Herrera <alvherre@kurilemu.de>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Gavin LYU <gavin790417@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: [PATCH] remove incorrect comment in pg_resetwal.c
Date: Fri, 16 Jan 2026 11:41:58 +0100
Message-ID: <202601161035.bjcuyonxxdzn@alvherre.pgsql> (raw)
In-Reply-To: <CAApHDvqBVoO6uxSDBF9iYqWDvni76VYeb=ueZrvjbDsR-O7obQ@mail.gmail.com>
On 2026-Jan-16, David Rowley wrote:
> I think fixing it rather than removing it is the way to go. cc8d41511
> removed the first va arg and didn't update the comment.
>
> git diff cc8d41511~1..cc8d41511 -- */pg_resetwal.c | grep translator -C 3
> @@ -156,13 +157,13 @@ main(int argc, char *argv[])
> {
> /*------
> translator: the second %s is
> a command line argument (-e, etc) */
> - fprintf(stderr, _("%s: invalid
> argument for option %s\n"), progname, "-e");
> + pg_log_error("invalid argument
> for option %s", "-e");
> fprintf(stderr, _("Try \"%s
> --help\" for more information.\n"), progname);
Right. So the fix is to remove the word "second". But there are more
mistakes of the same ilk in the same commit, visible if you remove the
"-- */pg_resetwal.c" part of your command line.
So I propose to park the following in Michael's trivial fixes branch.
inline patch 1: src/bin/pg_basebackup/pg_receivewal.c, src/bin/pg_resetwal/pg_resetwal.c (+2/-2 lines) download inline-1.patchdiff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.cindex 4f9a7b076ca..ddfec298fb7 100644--- a/src/bin/pg_basebackup/pg_receivewal.c+++ b/src/bin/pg_basebackup/pg_receivewal.c@@ -770,7 +770,7 @@ main(int argc, char **argv)
if (replication_slot == NULL && (do_drop_slot || do_create_slot))
{
- /* translator: second %s is an option name */+ /* translator: %s is an option name */
pg_log_error("%s needs a slot to be specified using --slot",
do_drop_slot ? "--drop-slot" : "--create-slot");
pg_log_error_hint("Try \"%s --help\" for more information.", progname);
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.cindex b2c4b9db395..2e3dfd7c94a 100644--- a/src/bin/pg_resetwal/pg_resetwal.c+++ b/src/bin/pg_resetwal/pg_resetwal.c@@ -188,7 +188,7 @@ main(int argc, char *argv[])
if (endptr == optarg || *endptr != '\0' || errno != 0)
{
/*------
- translator: the second %s is a command line argument (-e, etc) */+ translator: %s is a command line argument (-e, etc) */
pg_log_error("invalid argument for option %s", "-e");
pg_log_error_hint("Try \"%s --help\" for more information.", progname);
exit(1);
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"No tengo por qué estar de acuerdo con lo que pienso"
(Carlos Caszeli)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@kurilemu.de, dgrowleyml@gmail.com, michael@paquier.xyz, gavin790417@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: [PATCH] remove incorrect comment in pg_resetwal.c
In-Reply-To: <202601161035.bjcuyonxxdzn@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox