Обсуждение: shared_preload_libraries and pg_stat_statements
Hi all In my postgresql.conf I have shared_preload_libraries = 'pg_stat_statements, pg_shard' # (change requires restart) pg_stat_statements.max = 10000 pg_stat_statements.track = all The server restarts ok, created the extension fine, but postgres=# select * from pg_stat_statements; ERROR: pg_stat_statements must be loaded via shared_preload_libraries And more postgres=# SHOW shared_preload_libraries; shared_preload_libraries -------------------------- pg_shard (1 row) postgres=# select * from pg_extension; extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition --------------------+----------+--------------+----------------+------------+---------------------+-------------- plpgsql | 10 | 11 | f | 1.0 | | pg_shard | 10 | 2200 | t | 1.1 | {16661,16669,16682} | {"","",""} pg_stat_statements | 10 | 2200 | t | 1.2 | | Could it be a collision from pg_shard and pg_stat_statements from the same value of extnamespace ? Thanks -- Armand
"Armand Pirvu (gmail)" <armand.pirvu@gmail.com> writes: > In my postgresql.conf I have > shared_preload_libraries = 'pg_stat_statements, pg_shard' # (change requires restart) > pg_stat_statements.max = 10000 > pg_stat_statements.track = all > The server restarts ok, created the extension fine, but > postgres=# select * from pg_stat_statements; > ERROR: pg_stat_statements must be loaded via shared_preload_libraries > And more > postgres=# SHOW shared_preload_libraries; > shared_preload_libraries > -------------------------- > pg_shard > (1 row) I'd say either you edited the wrong config file ("select * from pg_settings where name = 'shared_preload_libraries'" might help debug that), or you failed to restart the server (this change requires an actual stop and restart, not just reload config). regards, tom lane
Hi Tom Thank you That did it, darn files. Back in business so to speak Armand On Sep 4, 2015, at 3:18 PM, Tom Lane wrote: > "Armand Pirvu (gmail)" <armand.pirvu@gmail.com> writes: >> In my postgresql.conf I have > >> shared_preload_libraries = 'pg_stat_statements, pg_shard' # (change requires restart) >> pg_stat_statements.max = 10000 >> pg_stat_statements.track = all > >> The server restarts ok, created the extension fine, but > >> postgres=# select * from pg_stat_statements; >> ERROR: pg_stat_statements must be loaded via shared_preload_libraries > >> And more > >> postgres=# SHOW shared_preload_libraries; >> shared_preload_libraries >> -------------------------- >> pg_shard >> (1 row) > > I'd say either you edited the wrong config file ("select * from > pg_settings where name = 'shared_preload_libraries'" might help > debug that), or you failed to restart the server (this change > requires an actual stop and restart, not just reload config). > > regards, tom lane