Configuration parameter

wal_decode_buffer_size — PostgreSQL configuration parameter

Category Write Ahead Log Default 512kB Change scope Postmaster

A limit on how far ahead the server can look in the WAL, to find blocks to prefetch.

At a glance

Property Value
Parameter wal_decode_buffer_size
Category Write Ahead Log
Default 512kB
Value type integer
Change scope Server restart required (postgresql.conf)
Available in PostgreSQL 15, 16, 17, 18, 19 (added in 15)

What it does

A limit on how far ahead the server can look in the WAL, to find blocks to prefetch. If this value is specified without units, it is taken as bytes. The default is 512kB. This parameter can only be set at server start.

(Description quoted from the official PostgreSQL documentation.)

How to apply a change

Set it in postgresql.conf (or with ALTER SYSTEM) and restart the server — this parameter cannot change without a restart.

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

Tuning guidance

This parameter is rarely a performance lever. Leave it at the default unless you have a specific, documented reason to change it, change it on one session or one role/database first, and confirm the effect with pg_settings and your own measurements before rolling it out cluster-wide.

Reference

PostgreSQL documentation — wal_decode_buffer_size.

Keep going

Related & next steps

Was this helpful?

← All configuration parameters