Thread: [ADMIN] cfg pg_stat_statements in PG 9.5 error
Hi List , I am seeing the following issue: I have to cfg pg_stat_statements in Pg version 9.5.1: I create the extension inside db , next cfg: local_preload_libraries = '/usr/pgsql-9.5/share/extension/pg_stat_statements' when re-starting the PG server seeing this in errorlog : FATAL: access to library "/usr/pgsql-9.5/share/extension/pg_stat_statements" is not allowed I have root with full permission to the "/usr/pgsql-9.5/ and user postgres with exec only , what I am missing form this cfg?
ghiureai <isabella.ghiurea@nrc-cnrc.gc.ca> writes: > I have to cfg pg_stat_statements in Pg version 9.5.1: I create the > extension inside db , next cfg: > local_preload_libraries = > '/usr/pgsql-9.5/share/extension/pg_stat_statements' > when re-starting the PG server seeing this in errorlog : > FATAL: access to library > "/usr/pgsql-9.5/share/extension/pg_stat_statements" is not allowed > I have root with full permission to the "/usr/pgsql-9.5/ and user > postgres with exec only , what I am missing form this cfg? Libraries to be loaded via local_preload_libraries must be in the plugins subdirectory. See the manual's description of that parameter. regards, tom lane
Tom, I am checking my cfg , I do not see a "plugins" subdirectory with pgsql95 contrib,at least I can not find one on my host , is there other pg conf parameter to change so can still point to initial location: ( I read most of the plugins must cfg as extensions now) /usr/pgsql-9.5/share/extension Thank you Isabella ghiureai <isabella.ghiurea@nrc-cnrc.gc.ca> writes: >> I have to cfg pg_stat_statements in Pg version 9.5.1: I create the >> extension inside db , next cfg: >> local_preload_libraries = >> '/usr/pgsql-9.5/share/extension/pg_stat_statements' >> when re-starting the PG server seeing this in errorlog : >> FATAL: access to library >> "/usr/pgsql-9.5/share/extension/pg_stat_statements" is not allowed >> I have root with full permission to the "/usr/pgsql-9.5/ and user >> postgres with exec only , what I am missing form this cfg? > Libraries to be loaded via local_preload_libraries must be in the plugins > subdirectory. See the manual's description of that parameter. > > regards, tom lane
ghiureai <isabella.ghiurea@nrc-cnrc.gc.ca> writes: > I am checking my cfg , I do not see a "plugins" subdirectory with > pgsql95 contrib, There isn't one in a default configuration. It's on the head of the local DBA to decide which libraries he/she is willing to allow in local_preload_libraries, and copy or move them into a plugins subdirectory. regards, tom lane
I solved my issue by cfg : shared_preload_libraries param. Tom, please what is the general recommendation for Pg contrib module ownership : user postgres or root? Thanks Isabella On 03/09/2017 10:08 AM, Tom Lane wrote: > ghiureai <isabella.ghiurea@nrc-cnrc.gc.ca> writes: >> I am checking my cfg , I do not see a "plugins" subdirectory with >> pgsql95 contrib, > There isn't one in a default configuration. It's on the head of the > local DBA to decide which libraries he/she is willing to allow in > local_preload_libraries, and copy or move them into a plugins > subdirectory. > > regards, tom lane
Hi, Le jeu. 9 mars, vers 10:12, ghiureai exprimait : > > I solved my issue by cfg : shared_preload_libraries param. > Tom, please what is the general recommendation for Pg contrib module > ownership : user postgres or root? For files, Debian and PGDG gives the ownership to root. For objects, it depends on which user launches the create extension (end of Description) : https://www.postgresql.org/docs/9.5/static/sql-createextension.html Regards, -- Stéphane KANSCHINE - http://www.hexack.fr./ - http://www.nuajik.com./ @ stephane@hexack.fr +33 6 64 31 72 52