Thread: Upgrade 7.0.3 -> 7.1.3 problems!

Upgrade 7.0.3 -> 7.1.3 problems!

From
David Link
Date:
Hi.

I'm trying to upgrade from 7.0.3 to 7.1.3 and I now have neither
working.

I made a dump file of my one database of interest.

I downloaded
 postgresql-7.1.3-1PGDG.i686.rpm
 postgresql-perl-7.1.3-1PGDG.i686.rpm
 postgresql-server-7.1.3-1PGDG.i686.rpm

I used rpmdrake (Mandrake 8.0) to install them.  And Ok.

I set up $PGDATA to point to a new place.

Ran initdb -- A-Okay.

I got message /usr/lib/libpg.so.2 not found.  So I copied it back over
from /var/lib/pgsql/backup/ and things started working...

Started postmaster as the postgres user and OK.  (But if I try to start
it as root with "/etc/init.d/postgresql start" I get error message --

Error:
An old version of the database format was found.\nYou need to upgrade
the  data format before using PostgreSQL.\nSee (Your System's
documentation directory)/postgresql-7.1.2/README.rpm-dist for more
information.
)

As postgres I can "createdb foo".  However when I try to use the psql
client I get error message:

Error:
psql: error while loading shared libraries: psql: undefined symbol:
PQgetssl
pq_recvbuf: unexpected EOF on client connection.

And I not have been unable to find any information on PQgetssl.

Can anybody tell me what's going on?

Thanks, David

Re: Upgrade 7.0.3 -> 7.1.3 problems!

From
David Link
Date:
Further information -- Here it is a little clearer:

1. ) Reinstall 7.0.3:

root#  rpm -v --force -i postgresql-server-7.0.3-2mdk.i586.rpm
postgresql-7.0.3-2mdk.i586.rpm
root#  /etc/init.d/postgresql status
root#  /etc/init.d/postgresql restart
postgres$ initdb
postgres$ createdb tmpdb
postgres$ psql -d tmpdb

EVERYTHING WORKS.

2. ) Reinstall 7.1.3:

root# /etc/init.d/postgresql stop
root# rpm -v --force -i postgresql*7.1.3*rpm
  postgresql-7.1.3-1PGDG
  postgresql-perl-7.1.3-1PGDG
  postgresql-server-7.1.3-1PGDG
postgres$ initdb
root# /etc/init.d/postgresql start

An old version of the database format was found.\nYou need to upgrade
the data format before using PostgreSQL.\nSee (Your System's
documentation directory)/postgresql-7.1.2/README.rpm-dist for more
information.

postgres$ postmaster &
postgres$ createdb tmpdb
postgres$ psql -d tmpdb

psql: error while loading shared libraries: psql: undefined symbol:
PQgetssl
pq_recvbuf: unexpected EOF on client connection

Anybody? Thanks - David



David Link wrote:
>
> Hi.
>
> I'm trying to upgrade from 7.0.3 to 7.1.3 and I now have neither
> working.
>
> I made a dump file of my one database of interest.
>
> I downloaded
>  postgresql-7.1.3-1PGDG.i686.rpm
>  postgresql-perl-7.1.3-1PGDG.i686.rpm
>  postgresql-server-7.1.3-1PGDG.i686.rpm
>
> I used rpmdrake (Mandrake 8.0) to install them.  And Ok.
>
> I set up $PGDATA to point to a new place.
>
> Ran initdb -- A-Okay.
>
> I got message /usr/lib/libpg.so.2 not found.  So I copied it back over
> from /var/lib/pgsql/backup/ and things started working...
>
> Started postmaster as the postgres user and OK.  (But if I try to start
> it as root with "/etc/init.d/postgresql start" I get error message --
>
> Error:
> An old version of the database format was found.\nYou need to upgrade
> the  data format before using PostgreSQL.\nSee (Your System's
> documentation directory)/postgresql-7.1.2/README.rpm-dist for more
> information.
> )
>
> As postgres I can "createdb foo".  However when I try to use the psql
> client I get error message:
>
> Error:
> psql: error while loading shared libraries: psql: undefined symbol:
> PQgetssl
> pq_recvbuf: unexpected EOF on client connection.
>
> And I not have been unable to find any information on PQgetssl.
>
> Can anybody tell me what's going on?
>
> Thanks, David
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

Re: Upgrade 7.0.3 -> 7.1.3 problems!

From
Tom Lane
Date:
David Link <dlink@soundscan.com> writes:

> postgres$ initdb
> root# /etc/init.d/postgresql start

> An old version of the database format was found.\n

AFAICS that message doesn't appear anywhere in the PG distribution,
so I suppose it must be coming out of the /etc/init.d/postgresql script.
Better look at that script and see what it's unhappy about.  A first
guess is that the data directory you initialized with "initdb" is not
the same data directory that the start script is expecting to use.
Check $PGDATA settings and/or -D arguments.

> psql: error while loading shared libraries: psql: undefined symbol:
> PQgetssl

This looks like psql was compiled with SSL support and libpq wasn't.
Are you sure you installed a complete set of compatible RPMs?  I'd
say one or the other file wasn't updated.

            regards, tom lane

Re: Upgrade 7.0.3 -> 7.1.3 problems!

From
David Link
Date:
Tom Lane wrote:
>
> David Link <dlink@soundscan.com> writes:
>
> > postgres$ initdb
> > root# /etc/init.d/postgresql start
>
> > An old version of the database format was found.\n
>
> AFAICS that message doesn't appear anywhere in the PG distribution,
> so I suppose it must be coming out of the /etc/init.d/postgresql script.
> Better look at that script and see what it's unhappy about.  A first
> guess is that the data directory you initialized with "initdb" is not
> the same data directory that the start script is expecting to use.
> Check $PGDATA settings and/or -D arguments.

Right you are about this Tom.  I just found this out myself.  The
/etc/init.d/postgresql script has PGDATA hardcoded.  And I've gotten
past it.  Thanks.

>
> > psql: error while loading shared libraries: psql: undefined symbol:
> > PQgetssl
>
> This looks like psql was compiled with SSL support and libpq wasn't.
> Are you sure you installed a complete set of compatible RPMs?  I'd
> say one or the other file wasn't updated.

What's a complete set?  What I thought all I needed was:
 postgresql-7.1.3-1PGDG.i686.rpm
 postgresql-perl-7.1.3-1PGDG.i686.rpm
 postgresql-server-7.1.3-1PGDG.i686.rpm

Do I need more?

Thank you much.!!

Re: Upgrade 7.0.3 -> 7.1.3 problems!

From
Tom Lane
Date:
David Link <dlink@soundscan.com> writes:
> psql: error while loading shared libraries: psql: undefined symbol:
> PQgetssl
>>
>> This looks like psql was compiled with SSL support and libpq wasn't.
>> Are you sure you installed a complete set of compatible RPMs?  I'd
>> say one or the other file wasn't updated.

> What's a complete set?  What I thought all I needed was:
>  postgresql-7.1.3-1PGDG.i686.rpm
>  postgresql-perl-7.1.3-1PGDG.i686.rpm
>  postgresql-server-7.1.3-1PGDG.i686.rpm

> Do I need more?

Darn if I know, but the 'rpm' command could tell you what these rpms
provide.  Also try "rpm -qa | grep postgres" to see if you have any
prior-version rpms you forgot to replace.

If postgresql-7.1.3-1PGDG.i686.rpm does indeed provide both libpq.so
and the psql executable, then the next likely problem is that you
have multiple versions of libpq.so on your system and psql is picking
up the wrong one.  Fooling about with the search path via ldconfig
should fix that, once you figure out what is where.

            regards, tom lane

Re: Upgrade 7.0.3 -> 7.1.3 problems!

From
David Link
Date:
> > > psql: error while loading shared libraries: psql: undefined symbol:
> > > PQgetssl
> >
> > This looks like psql was compiled with SSL support and libpq wasn't.
> > Are you sure you installed a complete set of compatible RPMs?  I'd
> > say one or the other file wasn't updated.
>
> What's a complete set?  What I thought all I needed was:
>  postgresql-7.1.3-1PGDG.i686.rpm
>  postgresql-perl-7.1.3-1PGDG.i686.rpm
>  postgresql-server-7.1.3-1PGDG.i686.rpm
>
> Do I need more?
>

You are right! I installed all the packages on
http://www.ca.postgresql.org/ftpsite/binary/v7.1.3/RPMS/mandrake-8.0/,
(the libs package I guess was the problem) and I have got 7.1.3 up and
running.
(And we've got outer joins!!!)

I can't thank you enough.  This is the best supported database
available.!

Sincerely, David Link, White Plains, NY

Re: Upgrade 7.0.3 -> 7.1.3 problems!

From
"Ben-Nes Michael"
Date:
Why not waiting for the 7.2 release ?

--------------------------
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--------------------------

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "David Link" <dlink@soundscan.com>
Cc: <pgsql-general@postgresql.org>
Sent: Tuesday, January 29, 2002 9:02 PM
Subject: Re: [GENERAL] Upgrade 7.0.3 -> 7.1.3 problems!


> David Link <dlink@soundscan.com> writes:
>
> > postgres$ initdb
> > root# /etc/init.d/postgresql start
>
> > An old version of the database format was found.\n
>
> AFAICS that message doesn't appear anywhere in the PG distribution,
> so I suppose it must be coming out of the /etc/init.d/postgresql script.
> Better look at that script and see what it's unhappy about.  A first
> guess is that the data directory you initialized with "initdb" is not
> the same data directory that the start script is expecting to use.
> Check $PGDATA settings and/or -D arguments.
>
> > psql: error while loading shared libraries: psql: undefined symbol:
> > PQgetssl
>
> This looks like psql was compiled with SSL support and libpq wasn't.
> Are you sure you installed a complete set of compatible RPMs?  I'd
> say one or the other file wasn't updated.
>
> 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@postgresql.org)
>


Re: Upgrade 7.0.3 -> 7.1.3 problems!

From
David Link
Date:
Ben-Nes Michael wrote:
>
> Why not waiting for the 7.2 release ?
>

When's that com'n?