Re: relfilenode - Mailing list pgsql-hackers

From Tom Lane
Subject Re: relfilenode
Date
Msg-id 25827.1130465022@sss.pgh.pa.us
Whole thread Raw
In response to relfilenode  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> The docs have this description for pg_class::relfilenode: "Name of the 
> on-disk file of this relation; 0 if none". However, Elein just pointed 
> out to me that there are no entries with 0, so this description seems 
> incorrect. What should we say? It appears that in at least some of these 
> cases the value is the same as the oid.

My opinion is that the documentation is right and the code is wrong ;-)
It's a bad idea to have valid-looking relfilenodes in entries that are
not describing real on-disk structures --- not least because such values
could by chance match on-disk files that actually exist, but belong to a
different pg_class entry.

This is probably just a matter of laziness somewhere in heap.c.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Trent Shipley
Date:
Subject: Re: enums
Next
From: "Jim C. Nasby"
Date:
Subject: Re: enums