Re: BUG #6134: pg_restore failed with "corrupt tar header"
От | Kevin Grittner |
---|---|
Тема | Re: BUG #6134: pg_restore failed with "corrupt tar header" |
Дата | |
Msg-id | 4E32A4AC020000250003F8E3@gw.wicourts.gov обсуждение исходный текст |
Ответ на | BUG #6134: pg_restore failed with "corrupt tar header" ("Gene Lum" <gene.lum@rsa.com>) |
Список | pgsql-bugs |
"Gene Lum" <gene.lum@rsa.com> wrote: > PostgreSQL version: 9.0 > Operating system: Windows 7 (32-bit) > 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. As I understand you: (1) If you run pg_restore from the command line it works. (2) If you run pg_restore from within Java, passing the file name on the -f switch it works. (3) If you run pg_restore from within Java, piping the file in to the spawned process it works under Unix but not Windows. My first guess would be that Windows is treating the input as a *character* stream rather than a *byte* stream. You should check whether that is something you can control when you launch the process in Java. Or do you have some reason to believe that this would be under control of the pg_restore executable? -Kevin
В списке pgsql-bugs по дате отправления: