Pmm@postgres ERROR: relation "pg_stat_statements" does not exist at character 753

Hello @Gunks535,

It’s likely that you need to run CREATE EXTENSION pg_stat_statements; in the postgres database that’s used by PMM to connect. Connecting to postgres db the default (and only, afaik) behavior for PMM at this point, and you can additionally see that in your error log showing pmm@postgres.

Even though in your case pg_stat_statements is in shared_preload_libraries, and thus is already tracking activities, you need to have the necessary view created. That happens when CREATE EXTENSION pg_stat_statements; is executed in a specific database. You have the pg_stat_statements view in root database, apparently.

Thanks,
Sergey

3 Likes