wal_init_zero

A configuration parameter determining whether new WAL files should be filled with zeroes

wal_init_zero is a configuration parameter determining whether new WAL files should be filled with zeroes.

wal_init_zero was added in PostgreSQL 12 .

Default value

The default value for wal_init_zero is: on.

Usage

If set to on (the default), new WAL files will be fillzed with zeroes, ensuring file space is allocated before WAL records are written. This is the same behaviour as in previous PostgreSQL versions,

If set to off, only the final byte is written when the file is created, which saves unnecessary work on "Copy-On-Write" (CoW) filesystems.

Change history

Categories

GUC configuration item, Performance, WAL

See also

wal_recycle