Hi Craig,
Here is my reply -
1. We are using RHEL with the below version
Linux version 2.6.18-194.26.1.el5 (mockbuild@xxxxxxxxxxxxxxxxxxxxxxxxxxxx) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Fri Oct 29 14:21:16 EDT 2010
2. LD_LIBRARY_PATH is not set
3. Yes, this seems to be a libpq settings problem.
Below is the GDB result -
[postgres@warehouse1 bin]$ ./psql -p 5444
LOG: unexpected EOF on client connection
Segmentation fault
[postgres@warehouse1 bin]$ gdb --args ./psql -p 5444
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5_5.2)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /opt/Postgres9.0.1/bin/psql...(no debugging symbols found)...done.
(gdb) run
Starting program: /opt/Postgres9.0.1/bin/psql -p 5444
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x00002aaaaaac2ecc in resetPQExpBuffer () from /opt/Postgres9.0.1/lib/libpq.so.5
Thanks
Nag
On Tue, Aug 9, 2011 at 8:22 AM, Craig Ringer <ringerc@xxxxxxxxxxxxx> wrote:
On 8/08/2011 7:11 PM, Venkat Balaji wrote:OK, you're building Pg from source rather than using packages provided by EDB or your operating system. Fair enough, albeit somewhat unusual for many production setups.
We had installed PostgreSQL9.0.1 for which i had executed the below
commands -
./configure --with-openssl --prefix=/opt/Postgresql9.0.1/
make install
installed successfully
The most likely cause is that the dynamic linker is using a different library than what Pg was compiled against for libssl, libpg, or something like that.
When i said "./psql -p 5445", I am getting the below error
You have neglected to mention the platform you're using or any of the other important data, so it's hard to give any more detailed instructions about how to track the issue down. It'd help if you mentioned what OS you were using, whether you uninstalled/deleted any prior versions of Pg, what your LD_LIBRARY_PATH is, what `ldd' reports when run on psql, etc.Most likely you have linkage problems, but if not it'd help if you'd get a backtrace of that client crash. Assuming you're on a machine with gdb:
[postgres@warehouse1 bin]$ ./psql -p 5445
LOG: unexpected EOF on client connection
Segmentation fault
gdb --args ./psql -p 5445
(gdb) run
.... blah blah
.... terminated with SIGSEGV (Segmentation fault)
(gdb) btIt's *EXTREMELY* likely to be an issue where you're linking to a different libpq possibly compiled with different options, then.
2. The same version of PostgreSQL was installed in the same server in adifferent location and is working fine without any issues -
3. Postgres process is running fine. When i am connecting from a
different PG installer bin directory,
I am able to connect.
--
Craig Ringer