Re: can't get pg_stat_statements to work

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: richard(at)xentu(dot)com
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: can't get pg_stat_statements to work
Date: 2015-09-19 14:37:38
Message-ID: 9175.1442673458@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

richard(at)xentu(dot)com writes:
> I've installed postgresql-contrib:

> # sudo apt-get install postgresql-contrib

> I now have a directory:
> /usr/share/postgresql/8.4/contrib
> I've added a line in postgresql.conf:

> shared_preload_libraries = 'pg_stat_statements'

> and I connected to postgres using pgAdmin and inside a test database, I
> ran the

> /usr/share/postgresql/8.4/contrib/pg_stat_statements.sql

> However, unless I comment out the new line in postgresql.conf, the
> server won't start.

What's the exact error message recorded in the postmaster log file?

The most likely bet is that the postmaster is failing to look in the
directory where the pg_stat_statements.so shared library is, which
would be a matter to take up with the Ubuntu packager(s) of Postgres:
postgresql-contrib really ought to be dropping its shared libraries
in a place where the postmaster's library search path will find them.
As a short-term workaround, I think it might work to put a full
path name into shared_preload_libraries instead of relying on the
code to find the library automatically.

But it could be something else. The error message would help.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message richard 2015-09-19 16:29:58 Re: can't get pg_stat_statements to work
Previous Message richard 2015-09-19 09:37:13 can't get pg_stat_statements to work