Summary
PostgreSQL accesses certain on-disk information via SLRU (simple least-recently-used) caches. The pg_stat_slru view will contain one row for each tracked SLRU cache, showing statistics about access to cached pages.
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_stat_slru statistics view exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
nametext
Name of the SLRUblks_zeroedbigint
Number of blocks zeroed during initializationsblks_hitbigint
Number of times disk blocks were found already in the SLRU, so that a read was not necessary (this only includes hits in the SLRU, not the operating system’s file system cache)blks_readbigint
Number of disk blocks read for this SLRUblks_writtenbigint
Number of disk blocks written for this SLRUblks_existsbigint
Number of blocks checked for existence for this SLRUflushesbigint
Number of flushes of dirty data for this SLRUtruncatesbigint
Number of truncates for this SLRUstats_resettimestamp with time zone
Time at which these statistics were last reset
Version applicability
Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.
Related & references
Reference: PostgreSQL documentation — pg_stat_slru.