Relations as Files
PostgreSQL identifies relation files via their OIDs.
The core data structure for this is RelFileNode :
typedef struct RelFileNode {
Oid spcNode;
Oid dbNode;
Oid relNode;
} RelFileNode;
|
Global (shared) tables (e.g. pg_database ) have
-
spcNode == GLOBALTABLESPACE_OID
-
dbNode == 0
|