Backends are having to evict dirty buffers themselves (buffers_backend) because the background writer cannot keep up — a sign that shared_buffers is too small or bgwriter settings are too conservative.
Diagnose it
-- From pg_stat_bgwriter (columns present in all supported versions):
SELECT buffers_clean,
maxwritten_clean,
buffers_alloc,
stats_reset
FROM pg_stat_bgwriter;
PostgreSQL 16+ note: checkpoint columns (buffers_checkpoint,
buffers_backend) moved to pg_stat_checkpointer in PG16. On PG15 and
earlier, use the richer pre-PG16 column set of pg_stat_bgwriter.
Key signals: maxwritten_clean > 0 means the bgwriter hit its page limit
per round (it stopped early); high buffers_alloc growth rate means new pages are
being allocated at a rate that outpaces cleaning.