Thread: Psql errors
Hello, I just installed Postgres 8.3.4. I have an instance of 8.2.4 running on the same box. When I start psql I get errors as follows: Welcome to psql 8.3.4 (server 8.2.4), the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit WARNING: You are connected to a server with major version 8.2, but your psql client is major version 8.3. Some backslash commands, such as \d, might not work properly. template1=# \l ld.so.1: psql: fatal: relocation error: file /db02/postgres/bin/psql: symbol pg_valid_server_encoding_id: referenced symbol not found Killed -bash-3.00$ There are two problems here that may or may not be related. One problem is that when I start psql using the binary I just loaded, the right version of psql starts but it is looking at the wrong database instance. Secondly, there is a library that in can't find. Please help with debugging these problems. Thank you very much, Carol
Hello, This first problem is fixed. I didn't specify the server specifically enough. As soon as I put the port number in, it started working. I still don't have a solution to the second problem. I'm running on Solaris 10. I tried adding the library path to ld.so.1, but that didn't work. Carol On Dec 22, 2008, at 9:43 AM, Carol Walter wrote: > Hello, > > I just installed Postgres 8.3.4. I have an instance of 8.2.4 > running on the same box. When I start psql I get errors as follows: > > Welcome to psql 8.3.4 (server 8.2.4), the PostgreSQL interactive > terminal. > > Type: \copyright for distribution terms > \h for help with SQL commands > \? for help with psql commands > \g or terminate with semicolon to execute query > \q to quit > > WARNING: You are connected to a server with major version 8.2, > but your psql client is major version 8.3. Some backslash commands, > such as \d, might not work properly. > > template1=# \l > ld.so.1: psql: fatal: relocation error: file /db02/postgres/bin/ > psql: symbol pg_valid_server_encoding_id: referenced symbol not found > Killed > -bash-3.00$ > > > There are two problems here that may or may not be related. One > problem is that when I start psql using the binary I just loaded, > the right version of psql starts but it is looking at the wrong > database instance. Secondly, there is a library that in can't find. > > Please help with debugging these problems. > > Thank you very much, > Carol > > > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin
Carol Walter <walterc@indiana.edu> writes: > I just installed Postgres 8.3.4. I have an instance of 8.2.4 running > on the same box. When I start psql I get errors as follows: > ... > template1=# \l > ld.so.1: psql: fatal: relocation error: file /db02/postgres/bin/psql: > symbol pg_valid_server_encoding_id: referenced symbol not found pg_valid_server_encoding_id is exported by the 8.3 version of libpq.so, but not by 8.2. So the problem here is that your 8.3 psql is binding to the wrong version of libpq.so. You didn't say what the platform is, but the issue is probably related to the search path used to find shared libraries. It would probably work to just overwrite the 8.2 library with 8.3 --- it should be backwards compatible. (Better save a backup copy in case not, of course.) regards, tom lane
Well, this is sort of interesting. I'm running Solaris 10. The problem was that I didn't export all of the necessary shared libraries. What's interesting is that it seems to matter what order these are in, in the path. If I export LD_LIBRARY_PATH and I put the library identified as the "libdir" in the arguments for ./configure first, it works, if I put it at that end it doesn't. Carol On Dec 22, 2008, at 11:50 PM, Tom Lane wrote: > Carol Walter <walterc@indiana.edu> writes: >> I just installed Postgres 8.3.4. I have an instance of 8.2.4 running >> on the same box. When I start psql I get errors as follows: >> ... >> template1=# \l >> ld.so.1: psql: fatal: relocation error: file /db02/postgres/bin/psql: >> symbol pg_valid_server_encoding_id: referenced symbol not found > > pg_valid_server_encoding_id is exported by the 8.3 version of > libpq.so, > but not by 8.2. So the problem here is that your 8.3 psql is binding > to the wrong version of libpq.so. You didn't say what the platform > is, but the issue is probably related to the search path used to find > shared libraries. > > It would probably work to just overwrite the 8.2 library with 8.3 > --- it should be backwards compatible. (Better save a backup copy > in case not, of course.) > > regards, tom lane > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin
On Tue, Dec 23, 2008 at 11:10 AM, Carol Walter <walterc@indiana.edu> wrote: > Well, this is sort of interesting. I'm running Solaris 10. The problem was > that I didn't export all of the necessary shared libraries. What's > interesting is that it seems to matter what order these are in, in the path. > If I export LD_LIBRARY_PATH and I put the library identified as the > "libdir" in the arguments for ./configure first, it works, if I put it at > that end it doesn't. What, exactly, do your export statements look like?