Re: [GENERAL] Postgres 9.6 Streaming Replication on Solaris 10 - Mailing list pgsql-general

From John R Pierce
Subject Re: [GENERAL] Postgres 9.6 Streaming Replication on Solaris 10
Date
Msg-id 4c835852-7c6f-11a5-ba3e-cb6b72ec73d3@hogranch.com
Whole thread Raw
In response to Re: [GENERAL] Postgres 9.6 Streaming Replication on Solaris 10  (<rich@salepointdata.com>)
List pgsql-general
On 12/19/2016 8:15 PM, rich@salepointdata.com wrote:
    Yes it is set in both the user's .profile and also in /etc/profile.  In both files it is set using:
LD_LIBRARY_PATH=/usr/sfw/lib:/usr/postgres/9.6-pgdg/lib
export LD_LIBRARY_PATH

That said, if I execute the following
su password
su postgres
echo $LD_LIBRARY_PATH

then echo returns blank.  Echo will return the correct value only in the usr login.  The question then is if postgres is running as usr postgres how does it know the value of LD_LIBRARY_PATH.  Isn't there another place where it must be set?


environment variables, including LD_LIBRARY_PATH gets dropped by su, which is used to launch the postgres service.


but generally, using LD_LIBRARY_PATH is frowned on, instead, you should link the applications with -R, or -Wl,-rpath and give it the path of the libraries, so thats baked into the binary.


-- 
john r pierce, recycling bits in santa cruz

pgsql-general by date:

Previous
From: Daniel Westermann
Date:
Subject: Re: [GENERAL] pg_restore to a port where nobody is listening?
Next
From: Guillaume Lelarge
Date:
Subject: Re: [GENERAL] pg_restore to a port where nobody is listening?