wal_buffers
Shared memory for WAL not yet written to disk; -1 sizes it automatically.
- 기본값
-1 (auto)- Range
- -1, or 32kB to about 2GB (smaller positive values are raised to 32kB)
- Restart needed
- 예
- Default checked on
- PostgreSQL 18
기능
-1 means 1/32 of shared_buffers, at least 64kB and at most one WAL segment (16MB by default). With shared_buffers at 128MB that is 4MB.
기본값
-1 (auto). -1 (PostgreSQL 18); with the default 128MB shared_buffers it resolves to 4MB.
Check the current value
SHOW wal_buffers; SELECT setting, unit, boot_val, context, source, pending_restart FROM pg_settings WHERE name = 'wal_buffers';
Change it
ALTER SYSTEM SET wal_buffers = '64MB'; -- applies only after a server restart
Server restart required (pg_settings.context is postmaster). ALTER SYSTEM only stages the new value in postgresql.auto.conf.
When to change it
Rarely: the auto value is right for most servers. Very write-heavy servers with many concurrent commits sometimes gain from 64MB.
What can go wrong
Low risk, but changing it needs a restart.
Questions about wal_buffers
What is the default value of wal_buffers in PostgreSQL?
-1 (auto). -1 (PostgreSQL 18); with the default 128MB shared_buffers it resolves to 4MB.
Does changing wal_buffers require a restart?
Yes. Server restart required (pg_settings.context is postmaster). ALTER SYSTEM only stages the new value in postgresql.auto.conf.
When should I change wal_buffers?
Rarely: the auto value is right for most servers. Very write-heavy servers with many concurrent commits sometimes gain from 64MB.
Back to all PostgreSQL settings, or check the PostgreSQL manual for every option.
Check wal_buffers on your own server
SQLly runs the query above against PostgreSQL and the other engines in this reference, from one desktop app on macOS, Windows and Linux.