---
title: "pg_stat_statements must be loaded via shared_preload_libraries"
url: https://michalasobczak.pl/posts/pg_stat_statements-must-be-loaded-via-shared_preload_libraries.html
author: "Michał Sobczak"
description: "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."
published: 2022-08-20T13:18:23.000Z
updated: 2022-09-06T10:43:27.000Z
language: en
categories: ["Technology"]
tags: ["PostgreSQL"]
license: CC BY-NC-ND 4.0 (https://creativecommons.org/licenses/by-nc-nd/4.0/)
---
# 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.
