/plushcap/analysis/timescale/timescale-database-scaling-postgresql-caching-explained-copy

Database Scaling: PostgreSQL Caching Explained

What's this blog post about?

PostgreSQL caching was implemented in the early 1990s to speed up access to data by keeping frequently accessed information in memory. The basic idea is simple: Memory is faster than disk, so why not store some of the most used data in memory? Over time, this improvement has proven very effective and valuable. However, as PostgreSQL has matured, other factors have become more prominent, making caching less accurate. This article explores the design principles behind PostgreSQL's shared memory system and how it interacts with the query planner and background writer processes. It also discusses cache eviction, forced eviction, and how improvements in disk and memory have affected the assumptions made in the original design. Future articles will delve into additional caveats and explore ways to tune caching for better performance.

Company
Timescale

Date published
Feb. 8, 2024

Author(s)
Kirk Laurence Roybal

Word count
2449

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.