Re: START_REPLICATION silently truncates an overlong LSN component

From: Jan Nidzwetzki <jan(at)planetscale(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, 'Fujii Masao' <masao(dot)fujii(at)gmail(dot)com>
Cc: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>, ♂π≌26218 <1991230470(at)qq(dot)com>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: START_REPLICATION silently truncates an overlong LSN component
Date: 2026-10-26 15:26:55
Message-ID: 39e2b3b2-aa68-4e8d-832e-6e3904e9bea7@planetscale.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Kuroda-san, Fujii-san,

Thanks for updating the patch set. I tested the two remaining ones on my
system. They apply cleanly and check-world passes.

Patch 0001
==========

I have just a small comment on the moved MAXPG_LSNLEN. It's currently a
hard-coded 17. It could make sense to export MAXPG_LSNCOMPONENT as well
and define MAXPG_LSNLEN as (2 * MAXPG_LSNCOMPONENT + 1), which would
document where the value comes from.

Patch 0002
==========

Kuroda-san wrote in the v5 mail:

> I also attached the test code to check invalid strings can be
rejected, see 0002.
> I'm not intended to be pushed.

I think this test is worth committing. As far as I can see, nothing else
covers the "this is an incremental backup, not a data directory" error,
and the new LSN checks would otherwise remain untested. However, we test
only an overlong high component. It could make sense to add this test
for the low component as well (e.g., using 0/123456789).

Best regards
Jan

--
Jan Nidzwetzki
PlanetScale Postgres Core Team

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Manu 2026-10-26 15:41:19 Re: BUG #19760: CLUSTER loses a row the transaction inserted and then updated in a rolled-back subtransaction
Previous Message Andres Freund 2026-10-26 13:31:48 Re: BUG #19796: io_uring crashes with specific kernel/liburing versions + io_max_concurrency due to rings overlap