Re: PostgreSQL Dump Based Restore with tar format is failing with 'corrupt tar header' error - Mailing list pgsql-admin

From Payal Singh
Subject Re: PostgreSQL Dump Based Restore with tar format is failing with 'corrupt tar header' error
Date
Msg-id CANUg7LA=DB4Dvk-EBuwLD4Q9V2ArRiBsbPttz_tDnZqYO2LAVQ@mail.gmail.com
Whole thread Raw
In response to PostgreSQL Dump Based Restore with tar format is failing with 'corrupt tar header' error  (girish R G peetle <giri.anamika0@gmail.com>)
List pgsql-admin
Which tar implementation are you using?

Payal Singh,
Database Administrator,
OmniTI Computer Consulting Inc.
Phone: 240.646.0770 x 253

On Tue, Oct 6, 2015 at 5:14 AM, girish R G peetle <giri.anamika0@gmail.com> wrote:

Hi

PostgreSQL Dump Based Restore with tar format is failing with 'corrupt tar header' error.

 

PostgreSQL Version - 9.4

Size of database (a0)  - 5092MB

 

Database ‘a0’ has two tables films(8192 Bytes) and tb2(5085MB). And contains no blob data.

 

Dump Command - pg_dump.exe -U postgres -Ft -b a0 > a0.dump

Restore Command - pg_restore.exe -Ft -C -U postgres -d postgres < a0.dump

 

------Error Output-----

2015-10-06 14:15:15 IST ERROR:  missing data for column "name"

2015-10-06 14:15:15 IST CONTEXT:  COPY tb2, line 1458917: "7"

2015-10-06 14:15:15 IST STATEMENT:  COPY tb2 (id, name, modtime) FROM stdin;

 

pg_restore: [archiver (db)] Error while PROCESSING TOC:

pg_restore: [archiver (db)] Error from TOC entry 1996; 0 295155 TABLE DATA tb2 postgres

pg_restore: [archiver (db)] COPY failed for table "tb2": ERROR:  missing data for column "name"

CONTEXT:  COPY tb2, line 1458917: "7"

pg_restore: [tar archiver] corrupt tar header found in -09-18 (expected 5, computed 30078) file position 91918336

----------------------

Please note that Dump and Restore of same database with COMPRESSED format is not giving any errors. Only with TAR format this issue is seen.

Can you please suggest on how to understand/diagnose the cause for restore failure ?


Thanks

Girish



pgsql-admin by date:

Previous
From: Jan
Date:
Subject: Re: Long-running and non-finishing VACUUM ANALYZE on large table
Next
From: Payal Singh
Date:
Subject: Re: Upgrade master / slave