Relations are stored in files in a directory for each database in the base directory. (If you don't know how to locate the base directory or the database's directory you can refer to my blog entries How to locate the data or cluster directory in PostgreSQL and How to locate the directory that contains a database in PostgreSQL)
Each file on the hard drive will refer to only one relation. The maximum file size of a file is 1GB. If a relation is larger than 1GB he relation will be stored in more than one file. The relation's file name is stored in the relfilenode field in the pg_class table. The relations's name itself is stored in the relname field of the pg_class table.
The query to locate the relation's file name is as follows:
The table employee is therefore stored in a files called 433981 on the hard drive. The file will be located in the database's directory in the data directory.
If the table is larger than 1 GB the table will be stored in multiple files like 24765, 24765.1 and 24765.2.


