What
- Shared buffer (Cache)
postgres=# SHOW shared_buffers;
shared_buffers
----------------
128MB
(1 row)
When retrieving a page:
- Check shared buffer
- Disk IO afterwards, and save it to shared_buffers
How
- Buffer Blocks
- Actual 8kb pages to store data
- Buffer Descriptors
- Parallel Array of ~64-byte structures, one per slot
- Hash Table
- map page id to buffer slot