Re: BUG #18866: Running pg_freespace() on views triggers an Abort - Mailing list pgsql-bugs

From Tender Wang
Subject Re: BUG #18866: Running pg_freespace() on views triggers an Abort
Date
Msg-id CAHewXNm8rkn9Vu-WhmMQMJS2hSqztbJO1cRv5-+Rp99+k43aJw@mail.gmail.com
Whole thread Raw
In response to Re: BUG #18866: Running pg_freespace() on views triggers an Abort  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #18866: Running pg_freespace() on views triggers an Abort
List pgsql-bugs


Tom Lane <tgl@sss.pgh.pa.us> 于2025年3月26日周三 00:37写道:
Tender Wang <tndrwang@gmail.com> writes:
> PG Bug reporting form <noreply@postgresql.org> 于2025年3月25日周二 22:42写道:
>> Passing a view to pg_freespace() triggers an Abort on HEAD.

> I think we can remove the Assert in smgropen().
> Any thoughts?

That seems like a "solution" that will allow other bugs.  pg_freespace
should be fixed to verify RELKIND_HAS_STORAGE() before it tries to
access said storage.

Thanks for the advice. Please see the attached patch.


--
Thanks,
Tender Wang
Attachment

pgsql-bugs by date:

Previous
From: Wyatt Berlinic
Date:
Subject: ltree gist index "incomplete split"
Next
From: "Euler Taveira"
Date:
Subject: Re: BUG #18866: Running pg_freespace() on views triggers an Abort