dbTalk Databases Forums  

postgre-7.4 and readline-4.3 /solaris 8

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss postgre-7.4 and readline-4.3 /solaris 8 in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Patrice Durosay
 
Posts: n/a

Default postgre-7.4 and readline-4.3 /solaris 8 - 01-26-2004 , 12:44 PM






Hello All,

I have a problem when starting postgre under solaris 8 :

bash-2.03# su - postgres -c "/usr/local/pgsql/bin/pg_ctl -D /dat/pgsql/data -l pgsql.log start &"
bash-2.03# 5068 Killed
postmaster successfully started


generate a /dat/pgsql/pgsql.log file :
ld.so.1: /usr/local/pgsql/bin/postmaster: fatal: libreadline.so.4: open failed: No such file or directory

bash-2.03# locate libreadline.so.4
/opt/sfw/lib/libreadline.so.4
/usr/local/lib/libreadline.so.4

Postmaster did'nt start

postgre's user PATHs are correct
LD_LIBRARY_PATH=:/usr/lib:/usr/local/lib:/opt/sfw/lib:/usr/local/netpbm/lib:/usr/local/pgsql/lib:/usr/local/pbm/lib
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/pgsql/bin:/opt/sfw/bin:/usr/dt/bin:/usr/ucb:/usr/local/netpb


Postmaster invocation don't do better.
# su - postgres -c "/usr/local/pgsql/bin/postmaster -D /dat/pgsql/data"
ld.so.1: /usr/local/pgsql/bin/postmaster: fatal: libreadline.so.4: open failed: No such file or directory
Killed


I reinstalled both readline & postgresql without more success.
It seem to be there :

bash-2.03# ldd /usr/local/pgsql/bin/postgres
libz.so => /usr/lib/libz.so
libreadline.so.4 => /usr/local/lib/libreadline.so.4
libcurses.so.1 => /usr/lib/libcurses.so.1
librt.so.1 => /usr/lib/librt.so.1
libresolv.so.2 => /usr/lib/libresolv.so.2
libgen.so.1 => /usr/lib/libgen.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libm.so.1 => /usr/lib/libm.so.1
libc.so.1 => /usr/lib/libc.so.1
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libaio.so.1 => /usr/lib/libaio.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Sun-Fire-480R/lib/libc_psr.so.1


Can anybody help me to start it ?

Patrice Durosay


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: postgre-7.4 and readline-4.3 /solaris 8 - 01-26-2004 , 01:59 PM






Patrice Durosay <patrice.durosay (AT) cgm (DOT) cnrs-gif.fr> writes:
Quote:
I reinstalled both readline & postgresql without more success.
It seem to be there :

bash-2.03# ldd /usr/local/pgsql/bin/postgres
libz.so => /usr/lib/libz.so
libreadline.so.4 => /usr/local/lib/libreadline.so.4
That's a good start, but now look to see what libreadline.so depends on.

Also, if you are depending on LD_LIBRARY_PATH to make the linker find
these libraries, then make sure that the postgres account's .profile
sets up LD_LIBRARY_PATH the same way. Remember that "su -" throws away
your environment and adopts the login environment of the target account.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)



Reply With Quote
  #3  
Old   
Patrice Durosay
 
Posts: n/a

Default Re: postgre-7.4 and readline-4.3 /solaris 8 - 01-27-2004 , 05:04 AM




Hi Tom,

Thank you for your remarks, They helped me to solve my problem under Solaris 8.

When I login as postgres, the paths are known as defined in /etc/profile.
root & postgres are bash users.
no .profile nor .bashrc are defined in the postgres's home dir /dat/pgsql.
I created a .bashrc in the postgres's homedir that was not read by su.
su postgres -c "env" looses LD_LIBRARY_PATH
su - postgres -c "env" looses also PATH (replaced by one directory)

The only way I found to allow postgre launching via /etc/init.d/postgresql
is to add a
RESTORE_LLP="source $PGDATA/.pathrc;"
in the command lines of the postgresql script :
su - $PGUSER -c "$RESTORE_LLP $DAEMON start -D '$PGDATA' -s -l $PGLOG"

with the postgres .pathrc file :

# restore minimal LD_LIBRARY_PATH for postgres running
LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/local/pgsql/lib
export LD_LIBRARY_PATH


Glad to be able to launch postgresql now. Many thanks.

Best regards

Patrice


Tom Lane a écrit :

Quote:
Patrice Durosay <patrice.durosay (AT) cgm (DOT) cnrs-gif.fr> writes:
I reinstalled both readline & postgresql without more success.
It seem to be there :

bash-2.03# ldd /usr/local/pgsql/bin/postgres
libz.so => /usr/lib/libz.so
libreadline.so.4 => /usr/local/lib/libreadline.so.4

That's a good start, but now look to see what libreadline.so depends on.

Also, if you are depending on LD_LIBRARY_PATH to make the linker find
these libraries, then make sure that the postgres account's .profile
sets up LD_LIBRARY_PATH the same way. Remember that "su -" throws away
your environment and adopts the login environment of the target account.


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.