1. Installed postgresql95-contrib (pkg install postgresql95-contrib)
2. Added to postgresql.conf:
shared_preload_libraries = 'pg_stat_statements'
track_activity_query_size = 2048
3. Server throws:
FATAL: could not load library "/usr/local/lib/postgresql/pg_stat_statements.so": dlopen (/usr/local/lib/postgresql/pg_stat_statements.so) failed: /usr/local/lib/postgresql/pg_stat_statements.so: Undefined symbol "durable_rename"
pg_ctl: could not start server
Examine the log output.
There seems to be a bug in postgresql-contrib, it does not depend on the server...
You do not write explicitally that you install postgreaql95-server. Did you? Which version do have?
pkg info -Ix postgres
(In reply to Palle Girgensohn from comment #1)
Either way, I cannot reproduce, it's works for me when building from ports.
Sorry, it was:
postgresql95-client-9.5.1 PostgreSQL database (client)
postgresql95-contrib-9.5.3 The contrib utilities from the PostgreSQL distribution
postgresql95-server-9.5.1 The most advanced open-source database available anywhere
I didn't expected "postgresql95-contrib-9.5.3" to be able to install with the wrong server version (9.5.1), from what I remember with postgresql-client - it will automatically upgrade\downgrade server part.
It works fine after pkg upgrade.
But still think some versioning validation bug exists on packages\ports level.
And even after that it doesn't work (no errors thrown anywhere though):
2016-06-16 08:50:18.436 PDT,"xxx","yyy",7795,"126.96.36.199:11824",5762caba.1e73,1,"",2016-06-16 08:50:18 PDT,4/6,0,ERROR,42883,"function pg_stat_statements_reset() does not exist",,"No function matches the given name and argument types. You might need to add explicit type casts.",,,,"SELECT pg_stat_statements_reset()",8,,""
"shared_preload_libraries";"pg_stat_statements";"Lists shared libraries to preload into server."
CREATE EXTENSION pg_stat_statements;
resolved all issues.
The module is really awesome, thanks!
Just to summarize all above - I think postgresql95-contrib should perform a server version validation before installing, this is a minor issue and you can ignore it and close the ticket.
If I understand right, this is solved. If it is so, please close the PR.
Hi, Sorry that this has been lying for more than a year. It is a great idea. I'll take it in at the next update of the port. Thanks!
re-opening and set as in progress