Thread: pg_dump error

pg_dump error

From
"David C. Brown"
Date:
I'm receiving an error from pg_dumpall while trying to backup my
database.  To explain, this database used to be 7.2.1 but we have
upgraded the server and I just used pg_dumpall and then reloaded that
data into the new system which runs on 7.3.3  The problem is I get an
error when using pg_dumpall/pg_dump.

Here are the version info and the error messages.

Old database.

                           version
-------------------------------------------------------------
 PostgreSQL 7.2.1 on i586-pc-linux-gnu, compiled by GCC 2.96
(1 row)


New database.


version
---------------------------------------------------------------------------------------------------------
 PostgreSQL 7.3.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2
20020903 (Red Hat Linux 8.0 3.2-7)
(1 row)


Error message when using pg_dump.  I get the same message with pg_dumpall.

pg_dump -i -U postgres whse > db.out
Password:
pg_dump: server version: PostgreSQL 7.3.3 on i686-pc-linux-gnu, compiled
by GCC gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7); pg_dump
version: 7.2.2
pg_dump: proceeding despite version mismatch
pg_dump: query to obtain list of data types failed: ERROR:  Attribute
"typprtlen" not found

It says that it's using pg_dump version 7.2.2.  I'm not sure if that is
the version that comes with 7.3.3, but PostgreSQL was compile fresh from
source on the new machine.  Where it got this version of
pg_dump/pg_dumpall I'm unclear of.


If anyone has any ideas that could help me out it would be greatly
appreciated.  I tried searching the pgsql-admin archives, but was unable
to find related items.

Thanks,
Dave


Re: pg_dump error

From
Tom Lane
Date:
"David C. Brown" <dbrown@centennialwines.com> writes:
> It says that it's using pg_dump version 7.2.2.  I'm not sure if that is
> the version that comes with 7.3.3, but PostgreSQL was compile fresh from
> source on the new machine.  Where it got this version of
> pg_dump/pg_dumpall I'm unclear of.

Your PATH is set up to find the 7.2 executables (in particular pg_dump)
before, or instead of, the ones installed for 7.3.  You need to fix the
PATH setting to find the 7.3 versions.

            regards, tom lane

Re: pg_dump error

From
"David C. Brown"
Date:
86 this request.  I've found my problem.  It seems that Dell had an old
version (7.2.2) of PostgreSQL installed.  It was using pg_dump from that
version instead of the new version.

The database dump worked great with the new version.

Dave

David C. Brown wrote:

> I'm receiving an error from pg_dumpall while trying to backup my
> database.  To explain, this database used to be 7.2.1 but we have
> upgraded the server and I just used pg_dumpall and then reloaded that
> data into the new system which runs on 7.3.3  The problem is I get an
> error when using pg_dumpall/pg_dump.
>
> Here are the version info and the error messages.
>
> Old database.
>
>                           version
> -------------------------------------------------------------
> PostgreSQL 7.2.1 on i586-pc-linux-gnu, compiled by GCC 2.96
> (1 row)
>
>
> New database.
>
>
> version
> ---------------------------------------------------------------------------------------------------------
>
> PostgreSQL 7.3.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2
> 20020903 (Red Hat Linux 8.0 3.2-7)
> (1 row)
>
>
> Error message when using pg_dump.  I get the same message with
> pg_dumpall.
>
> pg_dump -i -U postgres whse > db.out
> Password:
> pg_dump: server version: PostgreSQL 7.3.3 on i686-pc-linux-gnu,
> compiled by GCC gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7);
> pg_dump version: 7.2.2
> pg_dump: proceeding despite version mismatch
> pg_dump: query to obtain list of data types failed: ERROR:  Attribute
> "typprtlen" not found
>
> It says that it's using pg_dump version 7.2.2.  I'm not sure if that
> is the version that comes with 7.3.3, but PostgreSQL was compile fresh
> from source on the new machine.  Where it got this version of
> pg_dump/pg_dumpall I'm unclear of.
>
>
> If anyone has any ideas that could help me out it would be greatly
> appreciated.  I tried searching the pgsql-admin archives, but was
> unable to find related items.
>
> Thanks,
> Dave
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>