Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 762E09F9FA3 for ; Tue, 21 Aug 2007 21:23:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 94340-06 for ; Tue, 21 Aug 2007 21:23:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail2.yozons.com (mail2.yozons.com [63.251.168.97]) by postgresql.org (Postfix) with ESMTP id 215B89F957D for ; Tue, 21 Aug 2007 21:23:06 -0300 (ADT) Received: from [192.168.1.2] (pool-72-86-17-48.sttlwa.fios.verizon.net [72.86.17.48]) (authenticated bits=0) by mail2.yozons.com (8.12.10/8.12.10) with ESMTP id l7M0N5pH010708 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 21 Aug 2007 17:23:05 -0700 Message-ID: <46CB81EF.7080403@computer.org> Date: Tue, 21 Aug 2007 17:23:11 -0700 From: David Wall Reply-To: d.wall@computer.org User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: 8.2.4 pg_restore on WinXP and pipes Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/267 X-Sequence-Number: 26598 I'm using cygwin on WinXP and upgrading from 8.1 to 8.2.4. Under 8.1, I ran a full backup and stored that as GZIP file. Under 8.2, I tried to restore using the command: gunzip -c backup81.gz | pg_restore -v -O -d mydb This returned an error: pg_restore: [archiver] did not find magic string in file header The above commands work fine under Linux/Unix. What's interesting is that if I just gunzip the file and run it with non-pipe input redirection, the same thing works fine (so the data is good): gunzip backup81.gz pg_restore -v -O -d mydb < backup81 gzip backup81 It as if the pipe for stdin isn't working, but the other does. Any ideas? I'd prefer to not have to gunzip and then gzip and use the pipe as this is the common script we use on Linux and aside from this problem, works well when we run the same scripts under cygwin with WinXP. Thanks, David