Cluster database file layout

The PGDATA directory contains several subdirectories and control files, as shown in table below. In addition to these required items, the cluster configuration files postgresql.conf, pg_hba.conf, and pg_ident.conf are traditionally stored in PGDATA.

Item Description
PG_VERSION A file containing the major version number of Postgres
base Subdirectory containing per-database subdirectories


Subdirectory containing cluster-wide tables, such as pg_database


Subdirectory containing transaction commit status data


Subdirectory containing multitransaction status data (used for shared row locks)


Subdirectory containing LISTEN/NOTIFY status data


Subdirectory containing information about committed serializable transactions


Subdirectory containing exported snapshots


Subdirectory containing temporary files for the statistics subsystem
pg_subtrans Subdirectory containing subtransaction status data
pg_tblspc Subdirectory containing symbolic links to tablespaces
pg_twophase Subdirectory containing state files for prepared transactions
pg_xlog Subdirectory containing WAL (Write Ahead Log) files
postmaster.opts A file recording the command-line options the server was last started with A lock file recording the current postmaster process ID (PID), cluster data directory path, postmaster start timestamp, port number, Unix-domain socket directory path (empty on Windows), first valid listen address (IP address or *, or empty if not listening on TCP), and shared memory segment ID (this file is not present after server shutdown).