Beyond shared_buffers: On-Demand Memory in Modern PostgreSQL
summary
Explains how dynamic shared memory (DSM)—introduced in Postgres 9.4 with POSIX as the default implementation—lets backends allocate shared pages at runtime, with a tiny DSM control segment stored in main shared_buffers to register integer handlers. DSM segments map at different virtual addresses (ASLR), so Postgres uses DSA (dynamic shared areas) that store offsets instead of pointers, auto‑expand across segments, and provide attach/detach APIs; common uses are parallel query execution, parallel indexing, and extensions that need on‑demand interprocess memory.
AI-written summary · about
chapters (5)
- 0:00Introduction
- 0:28Memory in PostgreSQL
- 7:22Dynamic shared memory
- 11:36DSM segments in depth
- 21:52Applications and summary
related talks
50mInside PostgreSQL Shared Memory
32mDesigning and implementing a monitoring feature in PostgreSQL
45mEnhancing PostgreSQL Plasticity: New Frontiers in Memory Management
26mRethinking PostgreSQL Performance in the Age of Monster Hardware
27mEfficient shared memory data structures
16mScaleDB: A Scalable, Asynchronous In-Memory Database
52mChanging shared_buffers on the fly
39mPostgreSQL: Page Buffer Overview
