Disk Layout of PGDATA

Disk Layout of PGDATA

Content #

The main files are as follows:

  1. postgresql.conf

the main configuration file, used by default when the service is started.

  1. postgresql.auto.conf

the automatically included configuration file used to store dynamically changed settings via SQL instructions.

  1. pg_hba.conf

the HBA file that provides the configuration regarding available database connections.

  1. PG_VERSION

a text file that contains the major version number (useful when inspecting the directory to understand which version of the cluster has managed the PGDATA directory).

  1. postmaster.pid

the PID of the postmaster process, the first launched process in the cluster.

The main directories available in PGDATA are as follows:

  1. base

a directory that contains all the users’ data, including databases, tables, and other objects.

  1. global

a directory containing cluster-wide objects.

  1. pg_wal

the directory containing the WAL files.

  1. pg_stat and pg_stat_tmp

the storage of permanent and temporary statistical information about the status and health of the cluster.

From #