In this article, the author explains how to use pg_buffercache to view various metrics of a shared buffer in PostgreSQL.