This reply is focussed on the question of where one is instructed to modify LD_LIBRARY_PATH. You will find this in section 2.3 of the 'Simple PostgreSQL Install Instructions' by Robert Mello.
I have had the same problem with AOL Server reporting the libpq.so.2 cannot be found. My AOL Server is started from a script as root and the user nsadmin passed as the user to run as.
I will remove the LD_LIBRARY_PATH that I added from the file /etc/profile. I hope this will fix it.
Any other suggestions?