Re: unexpected data offset flag 0

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: matthias(dot)trauffer(at)bd(dot)zh(dot)ch
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: unexpected data offset flag 0
Date: 2014-04-25 14:15:32
Message-ID: 6202.1398435332@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

matthias(dot)trauffer(at)bd(dot)zh(dot)ch writes:
> I'm trying to restore a database dumpfile I made of a small 9.3.4 database
> using pg_dump -Fc -v -f "db.dump" db, but when I try to restore it on the
> same or on another 9.3.4 system with pg_restore -C -d postgres db.dump I
> get the following error message:
> pg_restore: [archiver] unexpected data offset flag 0
> Even listing the contents doesn't work: pg_restore -l db.dump
> pg_restore: [archiver] unexpected data offset flag 0
> I couldn't find anything in the documentation about this error message. Is
> it possible that the dump is corrupted?

Yeah, sounds that way :-(

> What can I do to fix this?

Probably not much, so far as this copy of the file is concerned. My first
guess as to what happened to it is Windows to non-Windows (or vice versa)
newline conversion, which could add or remove bytes and thus mangle the
file's archive structure. How did you transfer the file across machines
exactly?

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2014-04-25 14:22:44 Re: Return and sql tuple descriptions are incompatible
Previous Message Torsten Förtsch 2014-04-25 14:09:14 Re: How to find out PIDs of transactions older than the current?