Transactions & concurrency

SLRU (Simple LRU cache)

Also called: Simple LRU, slru.c cache

An SLRU is a small, fixed-size, least-recently-used cache of 8KB pages, implemented once in slru.c and reused for several internal logs. It is deliberately simpler than the main shared-buffer pool: a handful of buffers, basic LRU eviction, no full buffer manager. The same SLRU code backs the commit log (pg_xact), subtransaction map (pg_subtrans), and multixact data (pg_multixact), among others.

What this means

A small, fixed-size cache of 8 KB pages, far simpler than the main buffer pool, a handful of buffers, plain least-recently-used eviction, nothing fancy. Postgres wrote it once and reuses it for several internal logs, including the commit log, the subtransaction map, and multixact data.

Why it matters operationally

Because each SLRU is small and shared, it can become a concurrency hot spot under the right workload, heavy savepoints overflow into pg_subtrans, heavy row-share locking floods pg_multixact. PostgreSQL 17 made the buffer sizes configurable so you can relieve that pressure; pg_stat_slru lets you see it.

← All glossary terms · GUC reference · Error catalog