Re: Tablespace OID, database OID, relfilenode

2023-01-17 Thread Adrian Klaver
On 1/17/23 11:49, Wiwwo Staff wrote: Thank you Adrian, thank you David! So, it turns out, it *is* indeed an arbitrary constant... I have been answered many times RTFM, it is actually the first time I have being answered RTF source code. (I searched for 1663 in PG docs, it is there, although not

Re: Tablespace OID, database OID, relfilenode

2023-01-17 Thread Wiwwo Staff
Thank you Adrian, thank you David! So, it turns out, it *is* indeed an arbitrary constant... I have been answered many times RTFM, it is actually the first time I have being answered RTF source code. (I searched for 1663 in PG docs, it is there, although not really "intuitive"). Allow me to humbly

Re: Tablespace OID, database OID, relfilenode

2023-01-17 Thread Adrian Klaver
On 1/17/23 07:35, Wiwwo Staff wrote: Hi Laurenz, thanks for your answer! Ok, but I don't think "1663" is a sort of constant value for "base", isn't it? From source: backend/catalog/postgres.bki open pg_tablespace insert ( 1663 pg_default 10 _null_ _null_ ) insert ( 1664 pg_global 10 _null_ _

Re: Tablespace OID, database OID, relfilenode

2023-01-17 Thread David G. Johnston
On Tue, Jan 17, 2023 at 8:36 AM Wiwwo Staff wrote: > 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)? > >> >> The s

Re: Tablespace OID, database OID, relfilenode

2023-01-17 Thread Wiwwo Staff
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 wrote: > On Tue, 2023-01-17 at

Re: Tablespace OID, database OID, relfilenode

2023-01-17 Thread Laurenz Albe
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 n