Tablespace OID, database OID, relfilenode

From: Wiwwo Staff <wiwwo(at)wiwwo(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Tablespace OID, database OID, relfilenode
Date: 2023-01-17 14:48:58
Message-ID: CAFe70G57o3OnGhDLLU6LG=eg8r5CapK9UmCcT93kvOi+7LFrGA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!
Quick and to the point:

If i execute
select pg_relation_filepath('pgbench_accounts');

I get
pg_relation_filepath
----------------------
base/5/16398

where "base" is tablespace, but not tablespace OID, nor tablespace name.
How do I link it to get from "base" the tablespace OID?

Or, in other words, given table pgbench_accounts, how do I get tablespace
OID, database OID and relfilenode so that I can use this info to filter
output of pg_waldump?

Thanks a ton!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2023-01-17 15:01:30 Re: Tablespace OID, database OID, relfilenode
Previous Message Michael Paquier 2023-01-17 10:12:33 Re: minor bug