Determining disk usage
In this recipe, we will be discussing the PostgreSQL functionality that measures object size.
Getting ready
PostgreSQL follows a specific file storage layout, which stores data into multiple folders. The common directories that we see in the PostgreSQL data directory are:
base
: This folder contains the database subfolders and the subfolder will contain actual relational filesglobal
: This folder contains all the cluster level catalog informationpg_clog
: This folder contains the committed transactions information, which will be helpful during crash recoverypg_xlog
: This folder contains the ongoing transactions information, which will be helpful during crash recoverypg_tblsp
: This folder contains the symbolic link to tablespacespg_log
: This folder contains the database log files
PostgreSQL also has a few more additional directories, which also keep additional information about the running instance.
Note
Refer to this URL for more information about additional directories...