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):

shared_preload_libraries = 'pg_stat_statements'

Then activate extension in psql:

CREATE EXTENSION pg_stat_statements;

Restart server and you are done.