Where is the logig to create a table file?
When I use 'create table t(a int);'; suppose that this table t's oid is 1200,
then postgres will create a file named 1200 in the $PGDATA/base, So where
is the logic code in the internal?
--------------
jacktby@gmail.com
Hi, Jack
On Fri, 3 Feb 2023 at 13:19, jacktby@gmail.com <jacktby@gmail.com> wrote:
When I use 'create table t(a int);'; suppose that this table t's oid is 1200,
then postgres will create a file named 1200 in the $PGDATA/base, So where
is the logic code in the internal?
heapam_relation_set_new_filenode()->RelationCreateStorage()
Kind regards,
Pavel Borisov,
Supabase
At Fri, 3 Feb 2023 13:44:46 +0400, Pavel Borisov <pashkin.elfe@gmail.com> wrote in
Hi, Jack
On Fri, 3 Feb 2023 at 13:19, jacktby@gmail.com <jacktby@gmail.com> wrote:
When I use 'create table t(a int);'; suppose that this table t's oid is 1200,
then postgres will create a file named 1200 in the $PGDATA/base, So where
is the logic code in the internal?heapam_relation_set_new_filenode()->RelationCreateStorage()
Or if you are searching for the logic to determin the file name, see
GetNewRelFileNumber().
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center