Max buffers the background writer flushes per round.
At a glance
| Property | Value |
|---|---|
| Parameter | bgwriter_lru_maxpages |
| Category | Background Writer |
| Default | 100 |
| Value type | boolean / enum / numeric |
| Change scope | Reload (no restart) |
What it does
Maximum number of dirty buffers the background writer may write in each round. 0 disables background writing.
How to apply a change
Takes effect on configuration reload (sighup context). Run SELECT pg_reload_conf(); or send SIGHUP — no restart needed.
Inspect the current value and source with SHOW bgwriter_lru_maxpages; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'bgwriter_lru_maxpages';.
Tuning guidance
Raise (e.g. 500-1000) on write-heavy workloads so more cleaning happens in the background rather than by backends or checkpoints.