Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
> pg_class has a column, relfilenode, which almost invariably has the same
> value as the oid; I'm not sure whether, should they differ, the file
> would be named relfilenode or oid, though I would presume the former.
relfilenode is the thing to look at, not oid. AFAIR, only REINDEX and
CLUSTER assign new relfilenodes at present, so relfilenode will often
match oid --- but you'll eventually regret it if you write code that
assumes that.
regards, tom lane