Installation of pg_store_plans
The pg_store_plans extension is used for collection of advanced statistics for the monitored DBMS.
Before installing this extension, make sure that the pg_stat_statements extension is installed and postgresql.conf contains the line:
shared_preload_libraries = 'pg_stat_statements'
Important
If you have a PostgresPro type DBMS, go to section Connecting to a PostgresPro type DBMS using the pgpro_stats extension.
Installation of pg_store_plans on the Awide DBMS
To install the extension, follow these steps:
Edit postgresql.conf:
shared_preload_libraries = 'pg_store_plans'If other extensions are already specified in the parameter, add pg_stat_statements separated by a comma. Example:
shared_preload_libraries = 'pg_stat_statements, pg_store_plans'Note
To add an extension, you can use the Platform configuration module. For the shared_preload_libraries parameter, the recommended value will be indicated in the corresponding column.
Restart the monitored DBMS to apply the new parameters.
Create an extension:
su - postgres psql create EXTENSION pg_store_plans;
Installation of pg_store_plans on other DBMS
Before installation, obtain the installation package from the vendor’s repository, copy it to the server with the monitored DBMS, and install it:
apt-get install pg_store_plans
yum install pg_store_plans
dnf install pg_store_plans
Edit postgresql.conf:
shared_preload_libraries = 'pg_store_plans'
Restart the monitored DBMS to apply the new parameters.
Create an extension:
su - postgres psql create EXTENSION pg_store_plans;