Re: Inconsistent LSN format in pg_waldump output

From: Japin Li <japinli(at)hotmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Inconsistent LSN format in pg_waldump output
Date: 2025-07-07 14:48:59
Message-ID: ME0P300MB044533F3129DE078374ACB54B64FA@ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 07 Jul 2025 at 19:34, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> On Fri, Jul 4, 2025 at 5:18 PM Álvaro Herrera <alvherre(at)kurilemu(dot)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.
>

I see that PRI*64 macros, introduced in 15a79c73111, work for both translatable
and non-translatable messages. However, I'm unsure how to apply them for LSN
formatting.

--
Regards,
Japin Li

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Xuneng Zhou 2025-07-07 14:50:05 Re: Add progressive backoff to XactLockTableWait functions
Previous Message Nikita Malakhov 2025-07-07 14:33:11 Re: Support for 8-byte TOAST values (aka the TOAST infinite loop problem)