~/talk

PostgreSQL: Page Buffer Overview

Talkat PGConf India 2025 · 2025-03-05..03-07· [databases]
links:none on file
slides:none on file

Explains how PostgreSQL keeps 8KB pages in a shared buffer (default 128 MB, recommended ~25% RAM) and a hash lookup maps requests to ~16,364 buffer slots; page size is compile‑time fixed. Shows numbers: a table with ~10,632 disk pages, an index lookup reads 14 pages (4 shared hits), a sequential scan loads ~10,623 pages while only 42 buffer slots cycle. Describes usage counter max 5, pin count blocks eviction, free list, clock‑sweep victim selection, dirty pages written via WAL, and monitoring with pg_buffercache / pg_stat_io.

AI-written summary · about

  1. 0:00Introduction to buffer cache
  2. 1:33Shared memory pages and 8KB blocks
  3. 3:45Double buffering in PostgreSQL
  4. 5:13Shared buffers vs effective cache size
  5. 5:56Physical page size and storage
  6. 7:42Page structure and organization
  7. 12:43Querying and buffer cache examples
  8. 19:52Cache building over time
  9. 20:35Buffer management overview
  10. 25:50Clock sweep eviction algorithm
  11. 31:14Monitoring buffer cache with pg_buffercache
  12. 33:25Effective cache size in query planning
  13. 35:12Dirty pages and eviction process
  14. 36:26Buffer flushing during eviction
  15. 38:11Summary and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.