pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Wiwwo Staff <wiwwo@wiwwo.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Tablespace OID, database OID, relfilenode
Date: Tue, 17 Jan 2023 16:01:30 +0100
Message-ID: <1505292e2bedcfcf13e9334f686946742b9db7f2.camel@cybertec.at> (raw)
In-Reply-To: <CAFe70G57o3OnGhDLLU6LG=eg8r5CapK9UmCcT93kvOi+7LFrGA@mail.gmail.com>
References: <CAFe70G57o3OnGhDLLU6LG=eg8r5CapK9UmCcT93kvOi+7LFrGA@mail.gmail.com>

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





view thread (7+ messages)  latest in thread

Message-ID: <1505292e2bedcfcf13e9334f686946742b9db7f2.camel@cybertec.at>
Permalink:  ../1505292e2bedcfcf13e9334f686946742b9db7f2.camel@cybertec.at/
Also on:    postgresql.org/message-id/1505292e2bedcfcf13e9334f686946742b9db7f2.camel@cybertec.at

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, wiwwo@wiwwo.com
  Subject: Re: Tablespace OID, database OID, relfilenode
  In-Reply-To: <1505292e2bedcfcf13e9334f686946742b9db7f2.camel@cybertec.at>
  References: <CAFe70G57o3OnGhDLLU6LG=eg8r5CapK9UmCcT93kvOi+7LFrGA@mail.gmail.com> <1505292e2bedcfcf13e9334f686946742b9db7f2.camel@cybertec.at>

* 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