Re: Truncation of mapped catalogs (whether local or shared) leads to server crash

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Truncation of mapped catalogs (whether local or shared) leads to server crash
Date: 2024-06-18 14:20:26
Message-ID: 3596911.1718720426@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Jun 18, 2024 at 8:10 AM Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2024-06-18 14:22:01 Re: may be a buffer overflow problem
Previous Message Robert Haas 2024-06-18 14:13:44 Re: Truncation of mapped catalogs (whether local or shared) leads to server crash