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