1.查看是否安裝了pg_buffercachesql
postgres=# \dx List of installed extensions Name | Version | Schema | Description ----------------+---------+------------+--------------------------------- plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language (1 rows)
2.查看當前服務器是否可使用pg_buffercache擴展服務器
postgres=# select * from pg_available_extensions where name='pg_buffercache';
3.安裝pg_buffercache擴展post
postgres-# create extension pg_buffercache; postgres-# \dx List of installed extensions Name | Version | Schema | Description ----------------+---------+------------+--------------------------------- pg_buffercache | 1.3 | public | examine the shared buffer cache plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language (2 rows)
4.刪除pg_buffercacheblog
postgres-# drop extension pg_buffercache;