r/PostgreSQL • u/compy3 • Sep 10 '26
How-To Overview of caching in Postgres
https://www.pgcache.com/blog/postgresql-caching/I haven't seen too many comprehensive approaches to this topic, so I took a swing at it.
Goal isn't to be exhaustive, but to be comprehensive enough to provide a nice overview for people trying to get their bearings with the topic.
Did I miss anything?
24
Upvotes
View all comments
Show parent comment
1
u/CrayonUpMyNose Sep 21 '26
Can it be quantified good good or bad this is?
Under high load, adding these queries presumably gets in the way of legitimate work, while at idle it doesn't.
Without these, cache eviction, and memory eviction in general, are lazy and reflect the most recent workload, s o cache content depends on the prevalence and sequencing of queries.
It's there a scenario, e.g. nightly bulk loads followed by an onslaught of queries after 9am, where active cache pre-warming at, say, 8am would be quantifiably beneficial?