Re: BUG #18866: Running pg_freespace() on views triggers an Abort

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: Tender Wang <tndrwang(at)gmail(dot)com>, Euler Taveira <euler(at)eulerto(dot)com>, tharakan(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: BUG #18866: Running pg_freespace() on views triggers an Abort
Date: 2025-03-27 16:01:13
Message-ID: 2052347.1743091273@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> Not related to this issue but I wonder why blkno is verified after
> the relation is opened. It can be verified beforehand, no?

It makes sense to me to check the parameters left-to-right, so
I think verifying blkno after relation is fine. It's not like
there's value in optimizing the failure case.

This does, however, suggest that we ought to check the relkind
immediately after opening the rel, before the blkno check.
I'll adjust the patch that way and push.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-03-27 21:23:58 Re: BUG #18870: weird behavior with regexp_replace
Previous Message PG Bug reporting form 2025-03-27 13:43:50 BUG #18870: weird behavior with regexp_replace