Re: Inconsistent LSN format in pg_waldump output - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Inconsistent LSN format in pg_waldump output
Date
Msg-id CAExHW5tOnLyOcjFYF=xYUwY_LMo4gMYSp+K3QABfH=QjabGvgA@mail.gmail.com
Whole thread Raw
Responses Re: Inconsistent LSN format in pg_waldump output
List pgsql-hackers
On Fri, Jul 4, 2025 at 5:18 PM Álvaro Herrera <alvherre@kurilemu.de> wrote:
>
> On 2025-Jul-04, Japin Li wrote:
>
> > I've opted to directly use %X/%08X for LSN formatting in this patch, with an
> > accompanying comment near LSN_FORMAT_ARGS.
>
> Thank you!  I support this approach and intend to work on getting this
> patch committed soon after some more review, unless there are further
> objections.
>

I am wondering whether we should question the restriction on using
format macros because of translations. In fact, these format macros
can actually aid translations e.g. if the translation sees LSN_FORMAT
instead of %X/%X, it can use that knowledge to better translate the
message since it knows that it's an LSN instead of two sets of hex
numbers separated by /. If we could devise a prefix which will tell
them that what comes next is a FORMAT for a special datatype, would
the translation system be able to make use of this information. I am
not familiar with the translation system and I might be wrong in
making such an assumption.

--
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Dmitry Dolgov
Date:
Subject: Re: Changing shared_buffers without restart
Next
From: "Maksim.Melnikov"
Date:
Subject: Panic during xlog building with big values