Murthy Nunna <mnunna(at)fnal(dot)gov> writes:
> Following is output from "ldd" command:
> ldd /fnal/ups/prd/postgres/v9_5_3_x64/Linux-2-6/bin/psql | grep -i libpq
> libpq.so.5 => /fnal/ups/prd/postgres/v9_5_3_x64/Linux-2-6/lib/libpq.so.5 (0x00007fbce99f5000)
And that actually is the copy of psql you're invoking?
Another theory worth considering is that something is helpfully setting
PGHOST=/var/run/postgresql in psql's environment.
regards, tom lane