select * from pg_stat_statements;
-- and pg_stat_statements is enabled (if not - check here)
Error message:
ERROR: pg_stat_statements must be loaded via shared_preload_libraries
Cause:
pg_stat_statements is not set in postgresql.conf.
It probably looks like:
#shared_preload_libraries = '' # (change requires restart)
or with other libraries.
Solution:
1. Set pg_stat_statements in postgresql.conf; adding:
shared_preload_libraries = 'pg_stat_statements'
pg_stat_statements.max = 10000
pg_stat_statements.track = all
2. Restart PostgreSQL service
Check it:
SHOW shared_preload_libraries;
No comments:
Post a Comment