Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id A5540B5DBC1 for ; Fri, 29 Jul 2011 12:44:38 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 83950-01 for ; Fri, 29 Jul 2011 15:44:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id 05332B5DBBE for ; Fri, 29 Jul 2011 12:44:37 -0300 (ADT) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id p6TFiacu046093 for ; Fri, 29 Jul 2011 15:44:36 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id p6TFiaZ7046092; Fri, 29 Jul 2011 15:44:36 GMT (envelope-from www) Date: Fri, 29 Jul 2011 15:44:36 GMT Message-Id: <201107291544.p6TFiaZ7046092@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #6134: pg_restore failed with "corrupt tar header" From: "Gene Lum" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201107/199 X-Sequence-Number: 30811 The following bug has been logged online: Bug reference: 6134 Logged by: Gene Lum Email address: gene.lum@rsa.com PostgreSQL version: 9.0 Operating system: Windows 7 (32-bit) Description: pg_restore failed with "corrupt tar header" Details: I tried to import an output tar file from pg_dump (same version) using pg_restore. I can import using the command line without problem. I can also execute the command through a Java process by specifying the filename without problem. However, if I execute the command through a Java process and pipe in the file contents to the stdin of the process, the command failed with this error: Error: pg_restore: [tar archiver] corrupt tar header found in PGDMP (expected 364, computed 19903) file position 256 I used the same method on Unix without problem. This only happened on Windows.