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

global

Subdirectory containing cluster-wide tables, such as pg_database

pg_clog

Subdirectory containing transaction commit status data

pg_multixact

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

pg_notify

Subdirectory containing LISTEN/NOTIFY status data

pg_serial

Subdirectory containing information about committed serializable transactions

pg_snapshots

Subdirectory containing exported snapshots

pg_stat_tmp

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
postmaster.pid 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).