Re: [GENERAL] Postgres 9.6 Streaming Replication on Solaris 10

2016-12-22 Thread rich
Hi John,    I agree with you.  On Solaris I should not have to set LD_LIBRARY_PATH.  The location of the *.so files is baked in.  The strange part is that postgres starts up without errors and can be accessed from pgAdmin 4.  The problem is occurring from the replication functionality.  I am beginning to suspect there is a problem with the binary that I downloaded from the postgres site.  When I execute ldd -r  /usr/postgres/9.6-pgdg/lib/libpqwalreceiver.so there are many symbols not found.  I do not know what to make of it just yet.  I did reinstall.Regards,Rich Rutkowskir...@salepointdata.com



Re: [GENERAL] Postgres 9.6 Streaming Replication on Solaris 10

2016-12-21 Thread John R Pierce

On 12/19/2016 8:15 PM, r...@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



Re: [GENERAL] Postgres 9.6 Streaming Replication on Solaris 10

2016-12-21 Thread rich
Hi,    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/libexport LD_LIBRARY_PATHThat said, if I execute the followingsu passwordsu postgresecho $LD_LIBRARY_PATHthen 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?Regards,Rich Rutkowskir...@salepointdata.com


 Original Message 
Subject: Re: [GENERAL] Postgres 9.6 Streaming Replication on Solaris 10
From: Venkata B Nagothi <nag1...@gmail.com>
Date: Mon, December 19, 2016 5:03 pm
To: r...@salepointdata.com
Cc: pgsql-general <pgsql-general@postgresql.org>

On Mon, Dec 19, 2016 at 4:40 AM, <r...@salepointdata.com> wrote:Hello List,    I am setting up Postgres 9.6 for streaming replication.  The OS is Solaris X86  I downloaded the postgres solaris binaries from the Postres site and installed on 2 instances of Solaris 10.  I then used pg_dumpall to load the master server with data from our devel0pment server.  That all worked as advertised and was checked using pgAdmin Version 4.  No problems.  I then setup up the standby configuration and the master configuration and then used pg_basebackup from the standby to initialize its data.  Works, not a problem and verified using pgAdmin Version 4 that the data was there and read only.  However when a change was made on the master it does not appear on the standby.  A check of the standby server.log revealed the following message: FATAL: could not load library "/usr/postgres/9.6-pgdg/lib/libpqwalreceiver.so": ld.so.1: postgres: fatal: relocation error: file /usr/postgres/9.6-pgdg/lib/libpqwalreceiver.so: symbol PQconnectdbParams: referenced symbol not foundThe message repeats until the database is shutdown and restarted and then appears if a change is made on the master.  I think it is strange that this error is occurring on what appears to be a Do you have "/usr/postgres/9.6-pgdg/lib" part of LD_LIBRARY_PATH variable ? Regards,Venkata B NDatabase Consultant 





Re: [GENERAL] Postgres 9.6 Streaming Replication on Solaris 10

2016-12-19 Thread Venkata B Nagothi
On Mon, Dec 19, 2016 at 4:40 AM,  wrote:

> Hello List,
> I am setting up Postgres 9.6 for streaming replication.  The OS is
> Solaris X86  I downloaded the postgres solaris binaries from the Postres
> site and installed on 2 instances of Solaris 10.  I then used pg_dumpall to
> load the master server with data from our devel0pment server.  That all
> worked as advertised and was checked using pgAdmin Version 4.  No
> problems.  I then setup up the standby configuration and the master
> configuration and then used pg_basebackup from the standby to initialize
> its data.  Works, not a problem and verified using pgAdmin Version 4 that
> the data was there and read only.  However when a change was made on the
> master it does not appear on the standby.  A check of the standby
> server.log revealed the following message:
>
> FATAL: could not load library "/usr/postgres/9.6-pgdg/lib/li
> bpqwalreceiver.so": ld.so.1: postgres: fatal: relocation error: file
> /usr/postgres/9.6-pgdg/lib/libpqwalreceiver.so: symbol PQconnectdbParams:
> referenced symbol not found
>
> The message repeats until the database is shutdown and restarted and then
> appears if a change is made on the master.  I think it is strange that this
> error is occurring on what appears to be a
>

Do you have "/usr/postgres/9.6-pgdg/lib" part of LD_LIBRARY_PATH variable ?

Regards,
Venkata B N

Database Consultant


[GENERAL] Postgres 9.6 Streaming Replication on Solaris 10

2016-12-19 Thread rich
Hello List,    I am setting up Postgres 9.6 for streaming replication.  The OS is Solaris X86  I downloaded the postgres solaris binaries from the Postres site and installed on 2 instances of Solaris 10.  I then used pg_dumpall to load the master server with data from our devel0pment server.  That all worked as advertised and was checked using pgAdmin Version 4.  No problems.  I then setup up the standby configuration and the master configuration and then used pg_basebackup from the standby to initialize its data.  Works, not a problem and verified using pgAdmin Version 4 that the data was there and read only.  However when a change was made on the master it does not appear on the standby.  A check of the standby server.log revealed the following message:
FATAL:  could not
load library "/usr/postgres/9.6-pgdg/lib/libpqwalreceiver.so":
ld.so.1: postgres: fatal: relocation error: file
/usr/postgres/9.6-pgdg/lib/libpqwalreceiver.so: symbol
PQconnectdbParams: referenced symbol not foundThe message repeats until the database is shutdown and restarted and then appears if a change is made on the master.  I think it is strange that this error is occurring on what appears to be a functioning installation of postgres 9.6 on Solaris 10.  Did I miss a configuration setting?Thanks in advance for any guidance on this issue.Rich Rutkowskir...@salepointdata.com