Slru Infrastructure

PostgreSQL's Simple LRU (SLRU) subsystem — `src/backend/access/transam/slru.c` — the fixed-file, fixed-page cache used by CLOG (`pg_xact/`), MultiXact (`pg_multixact/`), Subtrans (`pg_subtrans/`), CommitTs (`pg_commit_ts/`), and Notify (`pg_notify/`). Covers the bank-locked LRU + latest-page pin design, `SlruCtl` structure, page replacement policy, and the on-disk 32-page-per-segment file layout. Loads when the user asks about SLRU semantics, per-consumer sizing GUCs (PG 17+ per-SLRU `Buffers` GUCs), why SLRUs use their own cache instead of shared buffers, adding a new SLRU consumer, or debugging SLRU-related wraparound / pressure. Skip when the ask is about specific SLRU consumers' semantics — the multixact skill covers multixact (which USES SLRU); this covers the SLRU MACHINERY itself.

matejformanek 0bd4109 8.4 KB Updated

File contents

matejformanek/postgres-claude/tree/main/.claude/skills/slru-infrastructure commit 0bd41098e2

Frequently asked questions

npx skillmds@latest add matejformanek/slru-infrastructure