Thread: pg_restore error

pg_restore error

From
"Roberto de Amorim"
Date:
Hi all,

I did a database backup using the command:$ pg_dump -Ft -b mydb >
backupdb.tar

and now I'm tring to restore this backup using:$ pg_restore -d mydb
backupdb.tar
and I'm getting this error message: Segmentation fault (core dumped)

what is wrong? or what the best way to me backup my database and restore it
in other computer? which params should I use in pg_dump and pg_restore???

please help


Roberto de Amorim - +55 48 346-2243
Software engineer at SmartBit Software
roberto@smartbit.inf.br



Re: pg_restore error

From
Doug McNaught
Date:
"Roberto de Amorim" <roberto@smartbit.inf.br> writes:

> Hi all,
>
> I did a database backup using the command:$ pg_dump -Ft -b mydb >
> backupdb.tar
>
> and now I'm tring to restore this backup using:$ pg_restore -d mydb
> backupdb.tar
> and I'm getting this error message: Segmentation fault (core dumped)

What version(s) of PG are you using?  Have you tried using the
"custom" format (-Fc) rather than tar?  -Fc has worked pretty well for
me.

-Doug

Re: pg_restore error

From
Tom Lane
Date:
"Roberto de Amorim" <roberto@smartbit.inf.br> writes:
> and now I'm tring to restore this backup using:$ pg_restore -d mydb
> backupdb.tar
> and I'm getting this error message: Segmentation fault (core dumped)

This is bad :-(.  Can you provide a stack backtrace from the core file?

            regards, tom lane

Re: pg_restore error

From
Bruce Momjian
Date:
Tom Lane wrote:
> "Roberto de Amorim" <roberto@smartbit.inf.br> writes:
> > and now I'm tring to restore this backup using:$ pg_restore -d mydb
> > backupdb.tar
> > and I'm getting this error message: Segmentation fault (core dumped)
>
> This is bad :-(.  Can you provide a stack backtrace from the core file?

I have seen this crash when the PostgreSQL shared libraries don't match
the pg_dump/pg_restore binary.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073