pg_stat_statements must be loaded via shared_preload_libraries

Latest Clustercontrol – version 1.9.4 – installation somehow requires pg_stat_statements to be activated in PostgreSQL 14. I have never noticed it before, both on 9.6, 12 and 14. This is simple fix. Change postgresql.conf configuration file (which should be either in /etc or /var/lib/ in standard package installations):

Text
shared_preload_libraries = 'pg_stat_statements'

Then activate extension in psql:

SQL
CREATE EXTENSION pg_stat_statements;

Restart server and you are done.

View as Markdown

All the content on this website is licensed under Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0). Cite as: Michał Sobczak, “pg_stat_statements must be loaded via shared_preload_libraries”, 20 August 2022, https://michalasobczak.pl/posts/pg_stat_statements-must-be-loaded-via-shared_preload_libraries.html