From: | Victor Yegorov <vyegorov(at)gmail(dot)com> |
---|---|
To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
Cc: | Soroosh Sardari <soroosh(dot)sardari(at)gmail(dot)com>, 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 11:16:35 |
Message-ID: | CAGnEbogGUo-w1iyqK_2LYxQjfz61FRTZ8qF=K_kWddcROvn7sg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2013/6/1 Martijn van Oosterhout <kleptog(at)svana(dot)org>
> On Sat, Jun 01, 2013 at 03:27:40PM +0430, Soroosh Sardari wrote:
> > Yes, I have some files which is not in pg_class.relfilenode of any table
> or
> > index.
> > I want to know which table or index stored in such files.
>
> That shouldn't happen. Are you sure you're looking in the right
> database? Kan you list the filenames?
According to the docs, it is possible if there had been
operations on the table that change filenode, like TRUNCATE.
Also, some some relations has relfilenode being 0, like pg_class catalogue
table.
Check more here:
http://www.postgresql.org/docs/current/interactive/storage-file-layout.html
It is recommended to use pg_relation_filenode() function:
http://www.postgresql.org/docs/current/interactive/functions-admin.html#FUNCTIONS-ADMIN-DBLOCATION
--
Victor Y. Yegorov
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2013-06-01 11:27:42 | Re: Which table stored in which file in PGDATA/base/[db-oid] |
Previous Message | Martijn van Oosterhout | 2013-06-01 11:04:55 | Re: Which table stored in which file in PGDATA/base/[db-oid] |