Re: Be strict when request to flush past end of WAL in WaitXLogInsertionsToFinish

From: Paul Kim <mok03127(at)gmail(dot)com>
To: bharath(dot)rupireddyforpostgres(at)gmail(dot)com
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Be strict when request to flush past end of WAL in WaitXLogInsertionsToFinish
Date: 2026-10-26 01:34:58
Message-ID: 179297849857.48422.13354066146949659122@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 19, 2026, Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
> I looked at the TAP test, and I found it a bit hard to follow given
> the many hard-coded values, [...]
> Would something like the below work instead [1]?

Yes, your test is easier to follow, so v7 uses it as 0002 in place of
the test_misc one. 0001 is unchanged from v6.

With 0001, the test passed 5 runs out of 5 on master. Without it, all
3 runs failed, with pg_switch_wal() returning the boundary + 40. Since
data checksums are now on by default, I also checked with pg_waldump
that no hint-bit FPI lands in the segment the test fills: it holds only
the 17 logical messages and the switch record.

The test applies to REL_15 through REL_19 as well, with only an offset.

Regards,
Paul Kim

Attachment Content-Type Size
v7-0001-Fix-end-LSN-reported-for-an-xlog-switch-record-en.patch text/x-patch 2.5 KB
v7-0002-Add-a-test-for-the-end-LSN-of-an-xlog-switch-reco.patch text/x-patch 3.9 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Manu 2026-10-26 01:21:37 Re: ZSTD TOAST compression, and an extensible compression method encoding