Re: Which table stored in which file in PGDATA/base/[db-oid]

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Soroosh Sardari <soroosh(dot)sardari(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Which table stored in which file in PGDATA/base/[db-oid]
Date: 2013-06-01 10:50:42
Message-ID: 20130601105042.GB30050@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jun 01, 2013 at 03:11:50PM +0430, Soroosh Sardari wrote:
> Dear Hackers
>
> I've created a new DB, and a bunch of files created in base/12054, 12054
> is oid of the new DB.
> I want to find what table stored in each file.
> BTW, I read this
> http://www.postgresql.org/docs/9.2/interactive/storage-file-layout.html
> I have 156 files with numerical names, vm and fsm file are ignored.
> 107 files are same as pg_class.reltoastrelid,so I have 49 files that I do
> not know what tables stored in them.
> Any idea to find ?

From that page:

Each table and index is stored in a separate file. For ordinary
relations, these files are named after the table or index's filenode
number, which can be found in pg_class.relfilenode.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> He who writes carelessly confesses thereby at the very outset that he does
> not attach much importance to his own thoughts.
-- Arthur Schopenhauer

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Soroosh Sardari 2013-06-01 10:57:40 Re: Which table stored in which file in PGDATA/base/[db-oid]
Previous Message Soroosh Sardari 2013-06-01 10:41:50 Which table stored in which file in PGDATA/base/[db-oid]