Re: Fix FSM range endpoint after relation extension - Mailing list pgsql-hackers

From Melanie Plageman
Subject Re: Fix FSM range endpoint after relation extension
Date
Msg-id CAAKRu_YBS21zHHjSxQB2Ud95v0CwhsFKGi4Ddi6h7Rh=SUY3Uw@mail.gmail.com
Whole thread
In response to Re: Fix FSM range endpoint after relation extension  (Jingtang Zhang <mrdrivingduck@gmail.com>)
Responses Re: Fix FSM range endpoint after relation extension
List pgsql-hackers
On Mon, Jul 13, 2026 at 12:28 AM Jingtang Zhang <mrdrivingduck@gmail.com> wrote:
>
> The patches are unchanged since the original posting. The fix is a
> one-line correction to pass last_block + 1 as the exclusive endpoint
> to FreeSpaceMapVacuumRange(), and the second patch includes a focused
> test crossing an FSM leaf-page boundary.
>
> If the diagnosis and fix look reasonable, I would greatly appreciate
> a review.

Yes, this looks like a real bug and your proposed fix is the fix. In
practice, it won't affect things much -- only when the page is the
first of a new FSM page. The issue was introduced in 16, so it will
need to be backpatched all the way back. I'll try to get to it later
this week if someone else doesn't beat me to it.

- Melanie



pgsql-hackers by date:

Previous
From: Ayush Tiwari
Date:
Subject: Re: Remove the refint contrib module (for v20)
Next
From: Robert Haas
Date:
Subject: Re: walsummarizer can get stuck when switching timelines