<div dir="ltr"><br /><div class="gmail_extra"><br /><br /><div class="gmail_quote">On Sat, Jun 1, 2013 at 3:57 PM,
AndresFreund <span dir="ltr"><<a href="mailto:andres@2ndquadrant.com"
target="_blank">andres@2ndquadrant.com</a>></span>wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px#ccc solid;padding-left:1ex"><div class="im">On 2013-06-01 13:04:55 +0200, Martijn van Oosterhout
wrote:<br/> > On Sat, Jun 01, 2013 at 03:27:40PM +0430, Soroosh Sardari wrote:<br /> > > Yes, I have some
fileswhich is not in pg_class.relfilenode of any table or<br /> > > index.<br /> > > I want to know which
tableor index stored in such files.<br /> ><br /> > That shouldn't happen. Are you sure you're looking in the
right<br/> > database? Kan you list the filenames?<br /><br /></div>It's actually entirely normal. For some system
tablesthe actual<br /> relfilenode isn't stored in the system catalog but in the relation<br /> mapper. Those are<br />
a)tables needed to access the catalogs themselves like pg_class,<br /> pg_attribute, pg_proc, ..<br /> b) shared
tableswhere we otherwise couldn't change the relfilenode from<br /> another database<br /><br /> To get the actual
relfilenodeyou actually need to do something like:<br /> SELECT relname, pg_relation_filenode(pg_class.oid) FROM
pg_class;<br/><br /><br /> Greetings,<br /><br /> Andres Freund<br /><span class="HOEnZb"><font color="#888888"><br />
--<br/> Andres Freund <a href="http://www.2ndQuadrant.com/"
target="_blank">http://www.2ndQuadrant.com/</a><br/> PostgreSQL Development, 24x7 Support, Training & Services<br
/></font></span></blockquote></div><br/><br /></div><div class="gmail_extra">Dear Andres<br /><br /></div><div
class="gmail_extra">Youare right, Some tables are mapped, and some other are global.<br /></div><div
class="gmail_extra">The SQL query is really helpful.<br /><br /></div><div class="gmail_extra">Thanks,<br />Soroosh<br
/></div></div>