From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Japin Li <japinli(at)hotmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Inconsistent LSN format in pg_waldump output |
Date: | 2025-07-03 01:16:57 |
Message-ID: | CAD21AoA4QLUVWwK1aT_3Sa-0CQ5n-FpYiOsipKrGe89xPDGE9Q@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jul 3, 2025 at 7:32 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Wed, Jul 02, 2025 at 08:57:45PM +0200, Alvaro Herrera wrote:
> > I think a tool would have to be severely miswritten in order to become
> > broken from this change. Our own code to scan LSNs is to use
> > scanf('%X/%X') which should work just fine with and without the leading
> > zeroes. I honestly don't see anybody coding this in any different way
> > that could not cope with the leading zeroes :-)
I had concerns regarding scenarios where users or tools
programmatically search for LSNs or perform string comparisons without
proper parsing, as initially raised by Japin Li. For instance, if a
newer version of the server records an LSN as '0/0AB10228' in the
server log, users attempting to search for this LSN won't find matches
in logs generated by older server versions. While such differences
might be acceptable across major version upgrades, I'm uncertain
whether this inconsistency is appropriate between minor versions.
> Yep. If you do not want this new policy to be forgotten by new paths,
> I'd suggested to standarize that with something like that, close to
> the existing LSN_FORMAT_ARGS():
> #define LSN_FORMAT "%X/%08X"
+1
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2025-07-03 01:19:08 | Re: libpq: Process buffered SSL read bytes to support records >8kB on async API |
Previous Message | Michael Paquier | 2025-07-03 01:13:19 | Re: A assert failure when initdb with track_commit_timestamp=on |