From: | "Euler Taveira" <euler(at)eulerto(dot)com> |
---|---|
To: | "Tender Wang" <tndrwang(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 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-26 01:55:52 |
Message-ID: | b6ea023a-703d-4afa-8561-9e867db1b5f0@app.fastmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Tue, Mar 25, 2025, at 10:18 PM, Tender Wang wrote:
> Thanks for the advice. Please see the attached patch.
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. This is an
existing message so no need for translation. The output will be like:
postgres=# SELECT pg_freespace('f', 0);
ERROR: cannot open relation "f"
DETAIL: This operation is not supported for foreign tables.
postgres=# SELECT pg_freespace('pg_roles', 0);
ERROR: cannot open relation "pg_roles"
DETAIL: This operation is not supported for views.
postgres=# SELECT pg_freespace('pg_class', 0);
pg_freespace
--------------
7520
(1 row)
I'm attaching a patch that includes these modifications.
--
Euler Taveira
EDB https://www.enterprisedb.com/
Attachment | Content-Type | Size |
---|---|---|
fsm.patch | text/x-patch | 845 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Zhijie Hou (Fujitsu) | 2025-03-26 05:07:47 | RE: BUG #18815: Logical replication worker Segmentation fault |
Previous Message | Tender Wang | 2025-03-26 01:18:41 | Re: BUG #18866: Running pg_freespace() on views triggers an Abort |