Re: Tablespace OID, database OID, relfilenode

Поиск
Список
Период
Сортировка
От Wiwwo Staff
Тема Re: Tablespace OID, database OID, relfilenode
Дата
Msg-id CAFe70G7qMpmasfNq4G3PgdEPubMkBJr34CZEPCPJ6eVF_sCtKg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Tablespace OID, database OID, relfilenode  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: Tablespace OID, database OID, relfilenode  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Tablespace OID, database OID, relfilenode  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
Hi Laurenz,
thanks for your answer!
Ok, but I don't think "1663" is a sort of constant value for "base", isn't it?

Let me clarify my question: how do I get, with a query, from "base" to 1663 (or whatever the value is)?

On Tue, Jan 17, 2023 at 4:01 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
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 по дате отправления:

Предыдущее
От: HECTOR INGERTO
Дата:
Сообщение: RE: Are ZFS snapshots unsafe when PGSQL is spreading through multiple zpools?
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Tablespace OID, database OID, relfilenode