Configuration parameter

wal_buffers — PostgreSQL Configuration Parameter

Category WAL Default -1 Unit memory (kB/MB/GB) Change scope Restart required

Shared memory for unwritten WAL.

At a glance

Property Value
Parameter wal_buffers
Category WAL
Default -1
Value type memory (kB/MB/GB)
Change scope Restart required

What it does

Amount of shared memory used for WAL not yet written to disk. -1 auto-sizes it to 1/32 of shared_buffers (capped at one WAL segment, 16MB).

How to apply a change

Requires a full server restart (postmaster context). Set it in postgresql.conf and restart PostgreSQL.

Inspect the current value and source with SHOW wal_buffers; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'wal_buffers';.

Tuning guidance

The auto value is fine for most. On very high write concurrency, explicitly setting 16MB-64MB can reduce WAL-write contention.

Reference

PostgreSQL documentation — WAL configuration.

Was this helpful?

← All configuration parameters