From: Michael Paquier <michael@paquier.xyz>
To: Noah Misch <noah@leadboat.com>
Cc: Ronan Dunklau <ronan.dunklau@aiven.io>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Subject: Re: FSM Corruption (was: Could not read block at end of the relation)
Date: Tue, 5 Mar 2024 09:56:12 +0900
Message-ID: <ZeZtrE9rwHDY4YLK@paquier.xyz> (raw)
In-Reply-To: <20240305001346.35.nmisch@google.com>
References: <VtPLBUerbMM8BSDLQwIMV9Co_38iHS1TXE4V09x2ZVFhPkZMNE8LwgPSIzB8PHkVFXykGx04QNAzZVjJFAnU1w==@protonmail.internalid>
<3549385.iIbC2pHGDl@aivenlaptop>
<20240304230503.a4.nmisch@google.com>
<3470254.QJadu78ljV@aivenlaptop>
<20240305001346.35.nmisch@google.com>
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
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: michael@paquier.xyz, noah@leadboat.com, ronan.dunklau@aiven.io, pgsql-bugs@lists.postgresql.org
Subject: Re: FSM Corruption (was: Could not read block at end of the relation)
In-Reply-To: <ZeZtrE9rwHDY4YLK@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox