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

2024-06-18 Thread Ashutosh Sharma
Hi, On Tue, Jun 18, 2024 at 8:25 PM Tom Lane wrote: > > Ashutosh Sharma writes: > > On Tue, Jun 18, 2024 at 7:50 PM Tom Lane wrote: > >> 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 catalo

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

2024-06-18 Thread Ashutosh Sharma
Hi Robert, Andres, Tom, Thank you for sharing your thoughts. On Tue, Jun 18, 2024 at 8:02 PM Andres Freund wrote: > > Hi, > > On 2024-06-18 19:58:26 +0530, Ashutosh Sharma wrote: > > On Tue, Jun 18, 2024 at 7:50 PM Tom Lane wrote: > > > > > > Robert Haas writes: > > > > On Tue, Jun 18, 2024 at

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

2024-06-18 Thread Tom Lane
Ashutosh Sharma writes: > On Tue, Jun 18, 2024 at 7:50 PM Tom Lane wrote: >> 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

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

2024-06-18 Thread Andres Freund
Hi, On 2024-06-18 19:58:26 +0530, Ashutosh Sharma wrote: > On Tue, Jun 18, 2024 at 7:50 PM Tom Lane wrote: > > > > Robert Haas writes: > > > On Tue, Jun 18, 2024 at 8:10 AM Ashutosh Sharma > > > wrote: > > >> Executing below commands: > > >> -- set allow_system_table_mods TO on; > > >> -- trun

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

2024-06-18 Thread Ashutosh Sharma
Hi, On Tue, Jun 18, 2024 at 7:50 PM Tom Lane wrote: > > Robert Haas writes: > > On Tue, Jun 18, 2024 at 8:10 AM Ashutosh Sharma > > wrote: > >> Executing below commands: > >> -- set allow_system_table_mods TO on; > >> -- truncate table pg_type; > > > If the operation isn't allowed without turn

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

2024-06-18 Thread Tom Lane
Robert Haas writes: > On Tue, Jun 18, 2024 at 8:10 AM Ashutosh Sharma 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 b

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

2024-06-18 Thread Robert Haas
On Tue, Jun 18, 2024 at 8:10 AM Ashutosh Sharma wrote: > I've noticed that truncating mapped catalogs causes the server to > crash due to an assertion failure. Here are the details: > > Executing below commands: > > -- set allow_system_table_mods TO on; > -- truncate table pg_type; If the operati

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

2024-06-18 Thread Ashutosh Sharma
Hi everyone, I've noticed that truncating mapped catalogs causes the server to crash due to an assertion failure. Here are the details: Executing below commands: -- set allow_system_table_mods TO on; -- truncate table pg_type; Results into a server crash with below backtrace: ... #2 0x557