pg_restore: [archiver] entry ID -825110830 out of range -- perhaps a corrupt TOC

Started by Dennis Cover 17 years ago6 messagesgeneral
Jump to latest
#1Dennis C
dcswest@gmail.com

Greetings:

I already did some searches on the "pg_restore: [archiver] entry ID
-825110830 out of range -- perhaps a corrupt TOC" error and am still not
sure why my database's not restoring after upgrading the FreeBSD and select
ports such as PostGreSQL. I did see something from a long time ago about
altering the table, especially column names, quite possibly being a problem
and I have done a lot of that, but as many backups as I've also done this
past year, this' the first time I've had to use the restore again and am now
not even sure how to get my database back. If this seems familiar and
simple enough for anyone, please advise including which details may be
useful here.

Thanks,

#2Andreas Wenk
a.wenk@netzmeister-st-pauli.de
In reply to: Dennis C (#1)
Re: pg_restore: [archiver] entry ID -825110830 out of range -- perhaps a corrupt TOC

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

maybe I did not understand - but what exactly happens when you do something like

pg_restore -d databasename -L backup.toc backup.bak (bak -> or what ever custom format you
use)

Is the version you did the backup with the same like the postgres version you want to
restore to? I am not sure, but maybe there are occuring some problems ...

$ less test.toc | grep "^;"
[...]
; Dumped from database version: 8.3.5
; Dumped by pg_dump version: 8.3.5
[...]

Cheers

Andy
- --
St.Pauli - Hamburg - Germany

Andreas Wenk

Dennis C schrieb:

Greetings:

I already did some searches on the "pg_restore: [archiver] entry ID
-825110830 out of range -- perhaps a corrupt TOC" error and am still not
sure why my database's not restoring after upgrading the FreeBSD and
select ports such as PostGreSQL. I did see something from a long time
ago about altering the table, especially column names, quite possibly
being a problem and I have done a lot of that, but as many backups as
I've also done this past year, this' the first time I've had to use the
restore again and am now not even sure how to get my database back. If
this seems familiar and simple enough for anyone, please advise
including which details may be useful here.

Thanks,

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJdYu7Va7znmSP9AwRAunPAKCliM90HkrNzQ51ectMmziqc7gTGwCeNrco
VvYrDL/hbinlF9gaPUMau1o=
=M8mK
-----END PGP SIGNATURE-----

#3Dennis C
dcswest@gmail.com
In reply to: Andreas Wenk (#2)
Re: pg_restore: [archiver] entry ID -825110830 out of range -- perhaps a corrupt TOC

Greetings;

And thanks for your reply! I tried the following:

less xaa | grep "^;"
"xaa" may be a binary file. See it anyway? y

Binary file (standard input) matches

And so am not sure which version I did the following from:

pg_dump -c -F c -Z 9 [databasename]

But I installed it about a year ago, so whichever was the release then.
Am trying to restore to the following:

postgresql-client-7.4.21 PostgreSQL database (client)
postgresql-plpython-7.4.21_1 A module for using Python to write SQL
functions
postgresql-server-7.4.21 The most advanced open-source database available
anywhere

As follows:

cat * | pg_restore -d [databasename]

And the following error's exactly what happens:

"pg_restore: [archiver] entry ID -825110830 out of range -- perhaps a
corrupt TOC"

It's worked for me many years before, but am now concerned that I've maybe
just lost this database, so any help would be so greatly appreciated and
thank you again so much!

On Tue, Jan 20, 2009 at 12:30 AM, Andreas Wenk <
a.wenk@netzmeister-st-pauli.de> wrote:

Show quoted text

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

maybe I did not understand - but what exactly happens when you do something
like

pg_restore -d databasename -L backup.toc backup.bak (bak -> or what ever
custom format you
use)

Is the version you did the backup with the same like the postgres version
you want to
restore to? I am not sure, but maybe there are occuring some problems ...

$ less test.toc | grep "^;"
[...]
; Dumped from database version: 8.3.5
; Dumped by pg_dump version: 8.3.5
[...]

Cheers

Andy
- --
St.Pauli - Hamburg - Germany

Andreas Wenk

Dennis C schrieb:

Greetings:

I already did some searches on the "pg_restore: [archiver] entry ID
-825110830 out of range -- perhaps a corrupt TOC" error and am still not
sure why my database's not restoring after upgrading the FreeBSD and
select ports such as PostGreSQL. I did see something from a long time
ago about altering the table, especially column names, quite possibly
being a problem and I have done a lot of that, but as many backups as
I've also done this past year, this' the first time I've had to use the
restore again and am now not even sure how to get my database back. If
this seems familiar and simple enough for anyone, please advise
including which details may be useful here.

Thanks,

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJdYu7Va7znmSP9AwRAunPAKCliM90HkrNzQ51ectMmziqc7gTGwCeNrco
VvYrDL/hbinlF9gaPUMau1o=
=M8mK
-----END PGP SIGNATURE-----

#4Scott Marlowe
scott.marlowe@gmail.com
In reply to: Dennis C (#3)
Re: pg_restore: [archiver] entry ID -825110830 out of range -- perhaps a corrupt TOC

On Tue, Jan 20, 2009 at 11:15 AM, Dennis C <dcswest@gmail.com> wrote:

Greetings;
And thanks for your reply! I tried the following:
less xaa | grep "^;"
"xaa" may be a binary file. See it anyway? y
Binary file (standard input) matches

And so am not sure which version I did the following from:
pg_dump -c -F c -Z 9 [databasename]

It's kind of important, but... PostgreSQL's dump and restore commands
are designed to work from the same versions or going a new version
from an older version. Going backwards is not supported.

But I installed it about a year ago, so whichever was the release then.
Am trying to restore to the following:

8.2 or 8.3. Unless you were using a version supplied by a distro,
which could go further back.

postgresql-client-7.4.21 PostgreSQL database (client)
postgresql-plpython-7.4.21_1 A module for using Python to write SQL
functions
postgresql-server-7.4.21 The most advanced open-source database available
anywhere

Now's the time to upgrade. 7.4 is the oldest supported version, which
means it's next for the chopping block. It's also A LOT slower than
8.3. Can you get and install a newer version of pgsql, preferably 8.3
and try restoring there?

cat * | pg_restore -d [databasename]

The normal way to run it is to use the -f switch for the file

pg_restore -d dbname -f filename

Not sure there's anything wrong with your way, but I've never used
pg_restore like that.

#5Dennis C
dcswest@gmail.com
In reply to: Scott Marlowe (#4)
Re: pg_restore: [archiver] entry ID -825110830 out of range -- perhaps a corrupt TOC

OK that was it! Wow, thank you so very much! Nice to know it was just
plpython tracking such an obsolete version of postgresql much to my dismay
now (especially even going backwards, which didn't even occur to me), as
opposed to postgresql itself being less reliable than I've come to expect
over the years! Thanks for all your great work with that too in the first
place!

On Tue, Jan 20, 2009 at 10:40 AM, Scott Marlowe <scott.marlowe@gmail.com>wrote:

Show quoted text

On Tue, Jan 20, 2009 at 11:15 AM, Dennis C <dcswest@gmail.com> wrote:

Greetings;
And thanks for your reply! I tried the following:
less xaa | grep "^;"
"xaa" may be a binary file. See it anyway? y
Binary file (standard input) matches

And so am not sure which version I did the following from:
pg_dump -c -F c -Z 9 [databasename]

It's kind of important, but... PostgreSQL's dump and restore commands
are designed to work from the same versions or going a new version
from an older version. Going backwards is not supported.

But I installed it about a year ago, so whichever was the release then.
Am trying to restore to the following:

8.2 or 8.3. Unless you were using a version supplied by a distro,
which could go further back.

postgresql-client-7.4.21 PostgreSQL database (client)
postgresql-plpython-7.4.21_1 A module for using Python to write SQL
functions
postgresql-server-7.4.21 The most advanced open-source database available
anywhere

Now's the time to upgrade. 7.4 is the oldest supported version, which
means it's next for the chopping block. It's also A LOT slower than
8.3. Can you get and install a newer version of pgsql, preferably 8.3
and try restoring there?

cat * | pg_restore -d [databasename]

The normal way to run it is to use the -f switch for the file

pg_restore -d dbname -f filename

Not sure there's anything wrong with your way, but I've never used
pg_restore like that.

#6Andreas Wenk
a.wenk@netzmeister-st-pauli.de
In reply to: Dennis C (#5)
Re: pg_restore: [archiver] entry ID -825110830 out of range -- perhaps a corrupt TOC

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dennis C schrieb:

OK that was it! Wow, thank you so very much! Nice to know it was just
plpython tracking such an obsolete version of postgresql much to my
dismay now (especially even going backwards, which didn't even occur to
me), as opposed to postgresql itself being less reliable than I've come
to expect over the years! Thanks for all your great work with that too
in the first place!

cool that it's working now ;-)

On Tue, Jan 20, 2009 at 10:40 AM, Scott Marlowe <scott.marlowe@gmail.com
<mailto:scott.marlowe@gmail.com>> wrote:

On Tue, Jan 20, 2009 at 11:15 AM, Dennis C <dcswest@gmail.com
<mailto:dcswest@gmail.com>> wrote:

Greetings;
And thanks for your reply! I tried the following:
less xaa | grep "^;"
"xaa" may be a binary file. See it anyway? y
Binary file (standard input) matches

And so am not sure which version I did the following from:
pg_dump -c -F c -Z 9 [databasename]

It's kind of important, but... PostgreSQL's dump and restore commands
are designed to work from the same versions or going a new version
from an older version. Going backwards is not supported.

That was what I head in mind asking you about the version ;-) Thank's to Scott for
bringing it to the point ;-)

But I installed it about a year ago, so whichever was the release

then.

Am trying to restore to the following:

8.2 or 8.3. Unless you were using a version supplied by a distro,
which could go further back.

postgresql-client-7.4.21 PostgreSQL database (client)
postgresql-plpython-7.4.21_1 A module for using Python to write SQL
functions
postgresql-server-7.4.21 The most advanced open-source database

available

anywhere

Now's the time to upgrade. 7.4 is the oldest supported version, which
means it's next for the chopping block. It's also A LOT slower than
8.3. Can you get and install a newer version of pgsql, preferably 8.3
and try restoring there?

cat * | pg_restore -d [databasename]

The normal way to run it is to use the -f switch for the file

pg_restore -d dbname -f filename

Not sure there's anything wrong with your way, but I've never used
pg_restore like that.

Cheers

Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJdvxAVa7znmSP9AwRAqqhAKCswD9ioSbJuIwiBLZLfTdTaW+jVwCgy3d7
IQiwmaLkNoxs7zbSZcH1+5E=
=i/ZQ
-----END PGP SIGNATURE-----