Glossary / Background Writer

Background Writer

Practical PostgreSQL glossary entry with a clear definition, example, and benchmarking context.

What Is Background Writer?

The background writer is a PostgreSQL process that periodically writes dirty buffers from shared memory to disk. This helps spread out I/O and reduce latency during heavy write operations. Monitoring it helps optimize checkpoint performance.

Why It Matters for PostgreSQL Performance

In PostgreSQL performance work, Background Writer affects throughput, latency, or operational reliability depending on workload and configuration.

Practical Benchmarking Context

When benchmarking with pgbench, track how Background Writer changes behavior across scale factor, client concurrency, and storage conditions.

Use this term together with workload shape, concurrency level, and scale factor when interpreting pgbench outputs. Isolated values can be misleading without full run context.

Example

Monitor: pg_stat_bgwriter

Related Resources