We recommend that you check the PostgreSQL documentation for system administration functions and views maintained by the statistics collector. We will be using the pg_relation_filepath function and the pg_stat_user_tables view.
We will also make use of a contributed utility named pgFincore. This utility is not included with standard PostgreSQL, but is often packaged for popular Linux distributions. To install it on an Ubuntu server along with the PostgreSQL server, use this command:
sudo apt-get install postgresql-9.6-pgfincore
Afterwards, activate it in the database with this query:
CREATE EXTENSION pgfincore;
For lucky users of 9.4 and above, there's also the option of pg_prewarm. It can be installed with this SQL:
CREATE ...