public inbox for [email protected]
help / color / mirror / Atom feedFrom: Stephen Frost <[email protected]>
To: Ronan Dunklau <[email protected]>
Cc: [email protected]
Subject: Re: Provide a pg_truncate_freespacemap function
Date: Wed, 6 Mar 2024 14:28:44 -0500
Message-ID: <ZejD7P+i2ZPDw8O/@tamriel.snowman.net> (raw)
In-Reply-To: <5446938.Sb9uPGUboI@aivenlaptop>
References: <5446938.Sb9uPGUboI@aivenlaptop>
Greetings,
* Ronan Dunklau ([email protected]) wrote:
> As we are currently experiencing a FSM corruption issue [1], we need to
> rebuild FSM when we detect it.
Ideally, we'd figure out a way to pick up on this and address it without
the user needing to intervene, however ...
> I noticed we have something to truncate a visibility map, but nothing for the
> freespace map, so I propose the attached (liberally copied from the VM
> counterpart) to allow to truncate a FSM without incurring downtime, as
> currently our only options are to either VACUUM FULL the table or stop the
> cluster and remove the FSM manually.
I agree that this would generally be a useful thing to have.
> Does that seem correct ?
Definitely needs to have a 'REVOKE ALL ON FUNCTION' at the end of the
upgrade script, similar to what you'll find at the bottom of
pg_visibility--1.1.sql in the tree today, otherwise anyone could run it.
Beyond that, I'd suggest a function-level comment above the definition
of the function itself (which is where we tend to put those- not at the
point where we declare the function).
Thanks!
Stephen
Attachments:
[application/pgp-signature] signature.asc (833B, ../ZejD7P+i2ZPDw8O%[email protected]/2-signature.asc)
download
view thread (2+ messages)
reply
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Provide a pg_truncate_freespacemap function
In-Reply-To: <ZejD7P+i2ZPDw8O/@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox