Re: FSM Corruption (was: Could not read block at end of the relation) - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: FSM Corruption (was: Could not read block at end of the relation)
Date
Msg-id ZeZtrE9rwHDY4YLK@paquier.xyz
Whole thread Raw
In response to Re: FSM Corruption (was: Could not read block at end of the relation)  (Noah Misch <noah@leadboat.com>)
Responses Re: FSM Corruption (was: Could not read block at end of the relation)  (Ronan Dunklau <ronan.dunklau@aiven.io>)
List pgsql-bugs
On Mon, Mar 04, 2024 at 04:13:46PM -0800, Noah Misch wrote:
> I agree each AM can use generic FPI code.  I'm looking at code like this as
> needing change under this candidate design:
>
> static void
> spgvacuumpage(spgBulkDeleteState *bds, BlockNumber blkno)
> {
> ...
>         if (PageIsNew(page) || PageIsEmpty(page))
>         {
>             RecordFreeIndexPage(index, blkno);
>
> The change there would be fairly simple, but non-core access methods may
> require similar simple changes.  That's fine if this approach has other
> reasons to win, but it is a drawback.  A grep of pgxn code shows "rum" as the
> only module containing a RecordFreeIndexPage() call.  No module contains a
> RecordPageWithFreeSpace() call.  So this drawback is all but negligible.

This design does not sound that bad to be, FWIW, if what you are
discussing impacts data inserts enough so be noticeable in the default
cases.  There are not that many out-of-core index AMs out there, and
"rum" is as far as I know not supported but any of the major cloud
vendors.  So contacting the authors of such AMs and raising awareness
would be enough.  So I would worry much more about performance.  My
2c.

(You should be able to implement a cheap test using two injection
points, from what I can read, if you need coordination between three
actions.)
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: David Rowley
Date:
Subject: Re: BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722
Next
From: Richard Guo
Date:
Subject: Re: BUG #18375: requested statistics kind "f" is not yet built for statistics object 16722