As seen before the data storage area is initialized by initdb . Its structure didn't change too much from the old fashioned 7.4. In this section we'll take a look to the various subdirectories and how their usage can affect the performances.
The numerical directories contains various files, also with the numerical name
which are actualy the database's relations, tables and indices.
The relation's name is set initially from the relation's object id. Any file
altering operation like VACUUM FULL or REINDEX, will generate a new file
with a different name. To find out the real relation's file name the
relfilenode inside the pg_class system table must be queried.
file. Each file is usually 16 Mb and contains all the data blocks changed during
the database activity.
The blocks are written first on this not volatile area to ensure the cluster's
recovery in case of cras. The data blocks are then written later to the
corresponding data files. If the cluster's shutdown is not clean then the wal
files are replayed during the startup process from the last known consistent
location read from control file.
In order to ensure good performance this location should stay on a dedicated