Re: Implement waiting for wal lsn replay: reloaded - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: Implement waiting for wal lsn replay: reloaded
Date
Msg-id 202512300309.ob42gaafej7v@alvherre.pgsql
Whole thread Raw
In response to Re: Implement waiting for wal lsn replay: reloaded  (Xuneng Zhou <xunengzhou@gmail.com>)
Responses Re: Implement waiting for wal lsn replay: reloaded
List pgsql-hackers
On 2025-Dec-27, Xuneng Zhou wrote:

> On Fri, Dec 26, 2025 at 4:25 PM Chao Li <li.evan.chao@gmail.com> 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).



pgsql-hackers by date:

Previous
From: "cca5507"
Date:
Subject: Re: [BUG] Incorrect historic snapshot may be serialized to diskduring fast-forwarding
Next
From: Tatsuya Kawata
Date:
Subject: Re: [PATCH] Add memory usage reporting to VACUUM VERBOSE