Installing pg_stat_statements

To ensure the correct operation of query modules and the display of certain dashboard elements, the pg_stat_statements extension shall be installed on the monitored DBMS.

Important

If you have:

sudo apt-get install postgresql-contrib

To install the extension, follow these steps:

  1. Edit the configuration file postgresql.conf:

shared_preload_libraries = 'pg_stat_statements'

If other extensions are already specified in the parameter, add pg_stat_statements separated by a comma.

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.

  1. Restart the monitored DBMS to apply the new parameters.

  2. Create an extension:

    su - postgres
    psql
    create EXTENSION pg_stat_statements;