Beyond shared_buffers: On-Demand Memory in Modern PostgreSQL
Presented by:
Vaibhav Popat
Hi there ! Its 14th Oct 2025, this is Vaibhav Popat - currently working as a software engineer in the AlloyDB team at Google.
I graduated with a Bachelors degree in Computer Science and Engineering from Visvesvaraya National Institute of Technology, Nagpur in 2021.
Worked for ~3 years at Goldman Sachs in the authorization space within IAM (Identity and Access Management) team before moving to Google to work on databases.
Within Computer Science, my interest lies in operating systems, IAM and databases. On the latter (databases) , have just scratched the surface, find it very interesting and excited to work a lot in this field in the years to come.
Cheers!
No video of the event yet, sorry!
In this talk, we will cover about Dynamic Shared Memory Segments - an alternative to the main shared memory , where memory can be requested even after PG startup.
Problem -
PG uses shared memory for inter-process communication among processes that need to access and share data with each other. But, the postmaster allows requesting any bytes in the main shared memory, only during PG startup. So, any operations that need some memory once the PG is up, can’t use the main shared memory.
Solution -
To tackle this problem, dynamic shared memory segments were introduced in Postgres 9.4 . The talk will primarily focus on -
- Memory allocation and subsequent access in DSM
- How is it different from main shared memory - since DSM structures are not mapped to the same address space in each process
- Nuances due to #2 above - use of offsets instead of pointers in DSM structures
- Application and use-cases
- Parallel query execution
- Creating extensions that need on-demand memory
Audience -
This talk will be primarily useful for developers building on top of OSS PG - who can use this knowledge to build custom extensions , fine-tune parallel query execution based on their needs, etc.
Impact -
Attendees will leave with a solid understanding of a core kernel topic that can be leveraged in varied ways, from building high-performance, parallel-aware extensions to more effectively diagnosing and tuning complex query plans.
- Date:
- Duration:
- 25 min
- Room:
- Conference:
- PGConf India, 2026
- Language:
- Track:
- Database Engine Developers
- Difficulty:
- Medium