Re: Tablespace OID, database OID, relfilenode - Mailing list pgsql-general

From Laurenz Albe
Subject Re: Tablespace OID, database OID, relfilenode
Date
Msg-id 1505292e2bedcfcf13e9334f686946742b9db7f2.camel@cybertec.at
Whole thread Raw
In response to Tablespace OID, database OID, relfilenode  (Wiwwo Staff <wiwwo@wiwwo.com>)
Responses Re: Tablespace OID, database OID, relfilenode
List pgsql-general
On Tue, 2023-01-17 at 15:48 +0100, Wiwwo Staff wrote:
> 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?

The tablespace OID is 1663, since "base" is the default tablespace "pg_default".

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com



pgsql-general by date:

Previous
From: Wiwwo Staff
Date:
Subject: Tablespace OID, database OID, relfilenode
Next
From: HECTOR INGERTO
Date:
Subject: RE: Are ZFS snapshots unsafe when PGSQL is spreading through multiple zpools?