shared_preload_libraries path

Started by Magnus Haganderalmost 14 years ago6 messageshackers
Jump to latest
#1Magnus Hagander
magnus@hagander.net

Would i make sense to have a postgresql.conf parameter that would add
to LD_LIBRARY_PATH when loading libraries from
shared_preload_libraries (and other library loads). To make it
possible to configure it without having to mess around with the
operating system configuration? Or is that too much reimplementing OS
functionality?

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In reply to: Magnus Hagander (#1)
Re: shared_preload_libraries path

On 24 May 2012 13:09, Magnus Hagander <magnus@hagander.net> wrote:

Would i make sense to have a postgresql.conf parameter that would add
to LD_LIBRARY_PATH when loading libraries from
shared_preload_libraries (and other library loads). To make it
possible to configure it without having to  mess around with the
operating system configuration? Or is that too much reimplementing OS
functionality?

-1, I'm afraid.

I found this blog post to be insightful:

https://blogs.oracle.com/rie/entry/tt_ld_library_path_tt

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

In reply to: Peter Geoghegan (#2)
Re: shared_preload_libraries path

On 24 May 2012 13:22, Peter Geoghegan <peter@2ndquadrant.com> wrote:

I found this blog post to be insightful:

https://blogs.oracle.com/rie/entry/tt_ld_library_path_tt

This one might be more useful, and itself refers to the
aforementioned, earlier post:

https://blogs.oracle.com/ali/entry/avoiding_ld_library_path_the

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Geoghegan (#2)
Re: shared_preload_libraries path

Peter Geoghegan <peter@2ndquadrant.com> writes:

On 24 May 2012 13:09, Magnus Hagander <magnus@hagander.net> wrote:

Would i make sense to have a postgresql.conf parameter that would add
to LD_LIBRARY_PATH when loading libraries from
shared_preload_libraries (and other library loads). To make it
possible to configure it without having to mess around with the
operating system configuration? Or is that too much reimplementing OS
functionality?

-1, I'm afraid.

I think the same. Aside from the problems Peter points out, there are
too many different ways to spell that variable name on different
platforms.

regards, tom lane

#5Peter Eisentraut
peter_e@gmx.net
In reply to: Magnus Hagander (#1)
Re: shared_preload_libraries path

On tor, 2012-05-24 at 14:09 +0200, Magnus Hagander wrote:

Would i make sense to have a postgresql.conf parameter that would add
to LD_LIBRARY_PATH when loading libraries from
shared_preload_libraries (and other library loads).

Well, you could write a library that sets it in its init function, and
load that before the library that needs it set. :-)

#6Magnus Hagander
magnus@hagander.net
In reply to: Peter Eisentraut (#5)
Re: shared_preload_libraries path

On Thu, May 24, 2012 at 7:58 PM, Peter Eisentraut <peter_e@gmx.net> wrote:

On tor, 2012-05-24 at 14:09 +0200, Magnus Hagander wrote:

Would i make sense to have a postgresql.conf parameter that would add
to LD_LIBRARY_PATH when loading libraries from
shared_preload_libraries (and other library loads).

Well, you could write a library that sets it in its init function, and
load that before the library that needs it set. :-)

:-) What's life without workarounds, eh? ;)

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/