Pghero on PostgresApp pg_stat_statements must be loaded via shared_preload_libraries

I have this error

PG::ObjectNotInPrerequisiteState: ERROR: pg_stat_statements must be loaded via shared_preload_libraries 

on the local host. Using osx (10.9.5), PostgresApp 9.3.1.0 and pghero gem

Going to postgresql.conf located in ~/Library/Application Support/Postgres93/var I have this at the top of the file

 shared_preload_libraries = 'pg_stat_statements' pg_stat_statements.track = all 

So, either this is the correct postgresql.conf, or something in my setup does not work.

Any ideas?

+7
postgresql rails-postgresql
source share
2 answers

You need to restart the Postgresql server to load the shared library and then execute it

 CREATE EXTENSION pg_stat_statements; 

in the database you want to track.

+1
source share

Create an extension by running the following query

 CREATE EXTENSION pg_stat_statements 
0
source share

All Articles