May 2019
Intermediate to advanced
600 pages
20h 46m
English
When you restart the database server, the contents of the buffer cache will be lost. The pg_prewarm module provides a convenient way to load relation data into the PostgreSQL buffer cache.
You can install the pg_prewarm extension that's provided by default as follows:
postgres=# CREATE EXTENSION pg_prewarm;CREATE EXTENSION
You can perform pre-warming for any relation:
postgres=# select pg_prewarm('job_status'); pg_prewarm------------ 1
The return value is the number of blocks that have been pre-warmed.
Read now
Unlock full access