Re: FSM Corruption (was: Could not read block at end of the relation)

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Ronan Dunklau <ronan.dunklau@aiven.io>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Date: 2024-03-01T09:12:43Z
Lists: pgsql-bugs
On Fri, Mar 01, 2024 at 09:56:51AM +0100, Ronan Dunklau wrote:
> In our case, we need to repair the FSM. The instructions on the wiki do work, 
> but maybe we should add something like the attached patch (modeled after the 
> same feature in pg_visibility) to make it possible to repair the FSM 
> corruption online. What do you think about it ?

I vaguely recall that something like that has been suggested around
917dc7d2393c in the past.

> The investigation of the corruption is still ongoing.

Thanks!
--
Michael

Commits

  1. freespace: Don't return blocks past the end of the main fork.

  2. Fix WAL-logging of FSM and VM truncation.

  3. Extend relations multiple blocks at a time to improve scalability.