pg_wal

Subdirectory of the main PostgreSQL data directory where WAL files are stored

pg_wal (in PostgreSQL 9.6 and earlier: pg_xlog) earlier is the subdirectory of the main PostgreSQL data directory where WAL files are stored.

It also contains the subdirectory archive_status..

Configuration parameters

Following configuration parameters affect the pg_wal directory in some way:

Following configuration parameters were present in PostgreSQL versions which are now EOL:

Functions

The following functions can be used to examine the contents of pg_wal:

Utilities

initdb

When executing initdb, a WAL directory location outside of the main data directory (e.g. on a different filesystem) can be specified with -X/--waldir (PostgreSQL 9.6 and earlier: -X/--xlogdir). A symbolic link from pg_wal in the main data directory to the specified location.

pg_basebackup

When executing pg_basebackup, a WAL directory location outside of the main data directory (e.g. on a different filesystem) can be specified with --waldir (PostgreSQL 9.6 and earlier: --xlogdir). A symbolic link from pg_wal in the main data directory to the specified location.

Categories

Data directory, PostgreSQL internals, Storage, WAL

See also

data directory, WAL