Inspecting the database cache
You can look inside the current contents of the PostgreSQL shared_buffers database cache using the pg_buffercache module. This is one of the optional contrib modules available that ships with PostgreSQL; see the Chapter 1, PostgreSQL Versions for more information about making sure these are installed. An introduction to pg_buffercache is available as part of the PostgreSQL documentation at http://www.postgresql.org/docs/current/static/pgbuffercache.html
The information on how the database stores information in this chapter assumes you have this module installed, so that you can look at how blocks in shared memory change as you perform various activities. This is the best way to understand how the relevant database ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access