MemoryRestart requireddefault -1 8kB

wal_buffers

Sets the number of disk-page buffers in shared memory for WAL.

How you change it

Restart required

Defaults and ranges on this page were read from pg_settings on live PostgreSQL 18.4. Treat older majors as needing their own check before you copy a value.

-1 means use a fraction of "shared_buffers".

What this means

The shared memory used to stage WAL records before they are flushed to disk. The default of -1 auto-sizes it to about 1/32 of shared_buffers (capped at one WAL segment), which is adequate for most workloads. It mainly matters for write-heavy systems with many concurrent committers.

When it matters

Leave at -1 unless you have very high write concurrency; then a fixed 16MB is a common bump.

Default-1 8kB
Range-1 – 262143
Typeinteger
Change scopeRestart required
CategoryMemory
Check the current value
SHOW wal_buffers;

Tradeoffs

  • Too low on write-heavy systems: backends contend on WAL buffer space at commit time.
  • Beyond ~16MB there is little benefit; WAL is flushed frequently regardless.
  • The -1 auto default is a sensible choice for the large majority of installs.
PostgreSQL manual: wal_buffers

← All GUCs · Glossary · Runbooks