Re: Fix FSM range endpoint after relation extension

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: Jingtang Zhang <mrdrivingduck(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Fix FSM range endpoint after relation extension
Date: 2026-07-15 20:00:41
Message-ID: CAAKRu_Z4d0yL1neTuFAyb1C=eVNWdbqwygHErnuQD35v6OLsLg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 15, 2026 at 10:07 AM Melanie Plageman
<melanieplageman(at)gmail(dot)com> wrote:
>
> On Mon, Jul 13, 2026 at 12:28 AM Jingtang Zhang <mrdrivingduck(at)gmail(dot)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.

Okay, I just pushed it. Thanks for the report!

- Melanie

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2026-07-15 20:10:59 Re: Why clearing the VM doesn't require registering vm buffer in wal record
Previous Message Melanie Plageman 2026-07-15 19:34:02 Re: Why clearing the VM doesn't require registering vm buffer in wal record