| From: | Guillaume Lelarge <guillaume(dot)lelarge(at)dalibo(dot)com> |
|---|---|
| To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: oid2name : add objects file path |
| Date: | 2025-11-26 20:02:45 |
| Message-ID: | d709fac2-adac-4a1e-a33c-028549137a3c@dalibo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi David,
I just looked at the commit fest entry and the bot says your patch needs
a rebase. Can you do it? Thanks.
Regards.
On 08/10/2025 14:44, David Bidoc wrote:
> On Tue, Oct 7, 2025 at 11:47 AM Euler Taveira <euler(at)eulerto(dot)com> wrote:
>
>> 1. The database query is wrong because it is considering that all databases are
>> in the default tablespace. If you create a database in a different tablespace
>> you will notice the mistake.
>
> Thank you for your feedback.
>
> Indeed, the path is wrong if the default tablespace is not used.
> I did not find a simple way to retrieve the database path (to my
> knowledge there is
> no function like pg_database_location() or something similar), so I have removed
> this part from the patch for now.
>
>>
>> 2. I suggest that you change one of the examples (maybe the last one) to
>> illustrate this feature.
>
> Here is a new example by adding a table in a different tablespace :
>
> $ oid2name -p 5435 -d b1 -t t2 -x
> From database "b1":
> Filenode Table Name Oid Schema Tablespace
> Filepath
> ----------------------------------------------------------------------------------------------
> 16403 t2 16403 public tblspc1
> pg_tblspc/16393/PG_19_202510082/16384/16403
>
>
>> Since you are in this area, you could create a separate patch for show the
>> tablespace location (-s option). Use pg_tablespace_location function.
>>
> I attached a new patch to add a column Tablespace Location to the -s option.
>
> $ oid2name -p 5435 -s
> All tablespaces:
> Oid Tablespace Name Tablespace Location
> ---------------------------------------------
> 1663 pg_default
> 1664 pg_global
> 16393 tblspc1 /mnt/tblspc1/pg
>
>> Register your patch for the next commitfest so we don't lose track of it. [1]
>> If you don't have an account, the 'Log In' link will redirect you to the page
>> to create a new one or even allow you to use a third party sign in.
>>
>> [1] https://commitfest.postgresql.org/56/
>>
>
> Done.
> https://commitfest.postgresql.org/patch/6111/
>
> Regards
> David Bidoc
--
Guillaume Lelarge
Consultant
https://dalibo.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Masahiko Sawada | 2025-11-26 20:11:19 | Re: POC: enable logical decoding when wal_level = 'replica' without a server restart |
| Previous Message | Myles Lewis | 2025-11-26 19:54:08 | Re: [PATCH] Add native PIVOT syntax for SQL Server/Oracle compatibility |