Thread: pg_restore returns always error if backup is greater than 2 GB

pg_restore returns always error if backup is greater than 2 GB

From
"Andrus Moor"
Date:
I noticed that backups created by pg_dump are not usable if backup file size
is greater than 2 GB.

Backups are create in 8.1 I tried to restore them in 8.4. Backup contains
many tables. There is a large table, attachme containing bytea field. This
table grows rapidly. If .backup file size is bigger that 2 GB, pg_restore
always fails for every table restored after that table:

C:/Program Files/PostgreSQL/8.4/bin\pg_restore.exe --host localhost --port
5432 --username postgres --dbname mydb --verbose "\\ls\share\my
cackups\backups\090703 my backup.backup"

pg_restore: connecting to database for restore
pg_restore: creating SCHEMA firma1
pg_restore: creating SCHEMA firma2
pg_restore: creating SCHEMA firma3
pg_restore: creating SCHEMA firma4
pg_restore: creating SCHEMA firma5
pg_restore: creating SCHEMA firma6
pg_restore: creating SCHEMA firma7
pg_restore: creating SCHEMA firma8
pg_restore: creating SCHEMA firma9
pg_restore: creating SCHEMA public
pg_restore: creating COMMENT SCHEMA public
pg_restore: creating PROCEDURAL LANGUAGE plpgsql
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 2214; 2612 16787 PROCEDURAL
LANGUAGE plpgsql postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  language
"plpgsql" already exists
    Command was: CREATE PROCEDURAL LANGUAGE plpgsql;
pg_restore: creating DOMAIN ebool
pg_restore: creating FUNCTION dok_seq_trig()
....
...
pg_restore: restoring data for table "attachme"
pg_restore: restoring data for table "bilkaib"
pg_restore: [custom archiver] found unexpected block ID (654399830) when
reading data -- expected 12781
pg_restore: *** aborted because of error

Process returned exit code 1.

How to recover data from tables in backup after attachme table ?

Andrus.

Environment:

Backups are created  in  PostgreSql 8.1 running in Windows
pg_dump is used to create backup copies to Buffalo Linkstation Pro ls-320 GB
external disk device ( \\ls ) connected to LAN

backup command: pg_dump.exe -ibv -Z3 -f \\ls\backup\mybackup.backup -Fc -h
localhost -U admin  mydb

What causes this ? is it Buffalo device, Windows/LAN or PostgreSql 8.1 issue
? Will upgrading to 8.4 fix this ?


Re: pg_restore returns always error if backup is greater than 2 GB

From
Tom Lane
Date:
"Andrus Moor" <kobruleht2@hot.ee> writes:
> I noticed that backups created by pg_dump are not usable if backup file size
> is greater than 2 GB.

> Backups are create in 8.1

This is a known bug that was fixed more than two years ago ... but not
in 8.1, which was already considered unsupportable on Windows at the
time.  You *really* need to get off of 8.1.

            regards, tom lane