pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Euler Taveira <euler@eulerto.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Tender Wang <tndrwang@gmail.com>
Cc: tharakan@gmail.com, pgsql-bugs@lists.postgresql.org, "Heikki Linnakangas" <hlinnaka@iki.fi>
Subject: Re: BUG #18866: Running pg_freespace() on views triggers an Abort
Date: Wed, 26 Mar 2025 13:51:51 -0300
Message-ID: <d8bce206-04fb-4503-b032-fe9e29b41459@app.fastmail.com> (raw)
In-Reply-To: <1618267.1743004859@sss.pgh.pa.us>
References: <18866-d68926d0f1c72d44@postgresql.org>
	<CAHewXNk6uX0VBROmoMrnKs_AOzbAQo+i9pouUiYj01y50HZRSw@mail.gmail.com>
	<1280897.1742920635@sss.pgh.pa.us>
	<CAHewXNm8rkn9Vu-WhmMQMJS2hSqztbJO1cRv5-+Rp99+k43aJw@mail.gmail.com>
	<b6ea023a-703d-4afa-8561-9e867db1b5f0@app.fastmail.com>
	<1618267.1743004859@sss.pgh.pa.us>

On Wed, Mar 26, 2025, at 1:00 PM, Tom Lane wrote:
> "Euler Taveira" <euler@eulerto.com> writes:
> > Your patch needs some adjustments. There is no need to include pg_class.h. I
> > don't like the proposed error message. I prefer saying the relation cannot be
> > opened because that's what will happen if it reaches this code path.
> 
> I don't care for that proposal either: we just did open the relation ;-)

Fair point.

> relcache.c:
>         elog(ERROR, "relation \"%s\" does not have storage",
>              RelationGetRelationName(relation));
> 
> So the previous proposal was evidently modeled on the first two of
> these precedents.  Personally I prefer messages that say *why*
> something failed, so I'd go with something more like "relation \"%s\"
> does not have storage".  Use of errdetail_relkind_not_supported is
> fine though.

I thought about saying "no storage" but don't know why was convinced by that
proposal. Your suggestion works for me.


--
Euler Taveira
EDB   https://www.enterprisedb.com/

view thread (14+ messages)  latest in thread

Message-ID: <d8bce206-04fb-4503-b032-fe9e29b41459@app.fastmail.com>
Permalink:  ../d8bce206-04fb-4503-b032-fe9e29b41459@app.fastmail.com/
Also on:    postgresql.org/message-id/d8bce206-04fb-4503-b032-fe9e29b41459@app.fastmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: euler@eulerto.com, tgl@sss.pgh.pa.us, tndrwang@gmail.com, hlinnaka@iki.fi
  Subject: Re: BUG #18866: Running pg_freespace() on views triggers an Abort
  In-Reply-To: <d8bce206-04fb-4503-b032-fe9e29b41459@app.fastmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox