Thomas Kellerer <spam_eater(at)gmx(dot)net> writes:
> Shridhar Daithankar schrieb:
>> You can just find the oid of the object from catalog and search for that
>> file. That's the principle.
> That easy ? :-)
Actually you must look at pg_class.relfilenode; this is initially the
same as oid, but there are operations (such as cluster and reindex) that
assign new relfilenode values because they replace the underlying file.
At the database level, pg_database.oid is correct.
regards, tom lane