PostgreSQL - Restart required
a) Permission: LOGIN, SUPERUSER, and INHERIT
b) Connect the PostgreSQL and run the following query in the query window to display the path to the postgresql.conf path.
show config_file;
[Screenshot 1 is not available on this page.]
c) Edit the "postgres.conf” file and add the below three statements after the ‘#shared_preload_libraries’ line and save.
shared_preload_libraries = 'pg_stat_statements'
pg_stat_statements.max = 10000
pg_stat_statements.track = all
[Screenshot 2 is not available on this page.]
d) Edit the pg_hba.conf file to include the necessary IP addresses under the local connections to enable with the PostgreSQL.
e) Connect to PostgreSQL and run the following query in the query window
CREATE EXTENSION pg_stat_statements;
f) To verify the extension is successfully installed run this command and check.
SELECT extname FROM pg_extension WHERE extname = 'pg_stat_statements';
f) Restart the PostgreSQL service.