Thread: Error trying to restore db with blobs

Error trying to restore db with blobs

From
"Evandro"
Date:
Hi everyone,

This is the command for dump I´m using:
pg_dump -Ft -b -o $DB | bzip2 > $ARQ

This is the command for restore:
pg_restore -h $SRV -vOd $DB -u $BUNZIPARQ

This error occurs both in 7.12 and 7.13 I didn´t tested in 7.2

I´m getting this error:

Archiver: ******** WARNING ********
Data restoration may fail since any defined triggers
can not be disabled (no superuser username specified).
This is only a problem for restoration into a database
with triggers already defined.

Creating <Init> Max OID
Archiver(db): Could not execute query. No result from backend.

any hint??
Thanks!

Atenciosamente,
Evandro Júnior
Analista de Sistemas
Desenvolvedor Web
http://www.horizontenet.com.br




Re: Error trying to restore db with blobs

From
Doug McNaught
Date:
"Evandro" <evandro@horizontenet.com.br> writes:

> This is the command for dump I´m using:
> pg_dump -Ft -b -o $DB | bzip2 > $ARQ
>
> This is the command for restore:
> pg_restore -h $SRV -vOd $DB -u $BUNZIPARQ
>
> This error occurs both in 7.12 and 7.13 I didn´t tested in 7.2
>
> I´m getting this error:
>
> Creating <Init> Max OID
> Archiver(db): Could not execute query. No result from backend.

I just ran into something like this.  Make sure you create the
database you're going to restore into with template0 as the template,
eg:

$ createdb -T template0 $DB
$ pg_restore <...>

That fixed it for me.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
   --T. J. Jackson, 1863

Re: Error trying to restore db with blobs

From
Tom Lane
Date:
"Evandro" <evandro@horizontenet.com.br> writes:
> pg_dump -Ft -b -o $DB | bzip2 > $ARQ
> pg_restore -h $SRV -vOd $DB -u $BUNZIPARQ

> Creating <Init> Max OID
> Archiver(db): Could not execute query. No result from backend.

This is is a bug in pg_restore that's triggered by the combination of
-Ft (or -Fc) and -o.  It's fixed in 7.2's pg_restore.

            regards, tom lane