Re: Truncation of mapped catalogs (whether local or shared) leads to server crash - Mailing list pgsql-hackers

From Ashutosh Sharma
Subject Re: Truncation of mapped catalogs (whether local or shared) leads to server crash
Date
Msg-id CAE9k0PmcmN=hJJ+W5G53+JZPgYWrWQYMa=uynY_P3ZeNQzq4bA@mail.gmail.com
Whole thread Raw
In response to Re: Truncation of mapped catalogs (whether local or shared) leads to server crash  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Truncation of mapped catalogs (whether local or shared) leads to server crash
Re: Truncation of mapped catalogs (whether local or shared) leads to server crash
List pgsql-hackers
Hi,

On Tue, Jun 18, 2024 at 7:50 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Robert Haas <robertmhaas@gmail.com> writes:
> > On Tue, Jun 18, 2024 at 8:10 AM Ashutosh Sharma <ashu.coek88@gmail.com> wrote:
> >> Executing below commands:
> >> -- set allow_system_table_mods TO on;
> >> -- truncate table pg_type;
>
> > If the operation isn't allowed without turning on
> > allow_system_table_mods, that means that doing it is probably a bad
> > idea and will probably break stuff, as happened here.
>
> Nothing good can come of truncating *any* core system catalog --- what
> do you think you'll still be able to do afterwards?
>
> I think the assertion you noticed is there because the code path gets
> traversed during REINDEX, which is an operation we do support on
> system catalogs.  I have zero interest in making truncate work
> on them.
>

I agree with you on that point. How about considering a complete
restriction instead?

--
With Regards,
Ashutosh Sharma.



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: CompilerWarnings task does not catch C++ warnings
Next
From: Maxim Orlov
Date:
Subject: Re: Maybe don't process multi xmax in FreezeMultiXactId() if it is already marked as invalid?