Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TLeh7-00087f-HA for pgsql-bugs@postgresql.org; Tue, 09 Oct 2012 18:38:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TLeh6-0006os-KX for pgsql-bugs@postgresql.org; Tue, 09 Oct 2012 18:38:16 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q99IcF4p002465; Tue, 9 Oct 2012 14:38:15 -0400 (EDT) From: Tom Lane To: hrtlik@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #7590: Data corruption using pg_dump only with -Z parameter In-reply-to: References: Comments: In-reply-to hrtlik@gmail.com message dated "Tue, 09 Oct 2012 14:20:40 -0000" Date: Tue, 09 Oct 2012 14:38:15 -0400 Message-ID: <2464.1349807895@sss.pgh.pa.us> X-Pg-Spam-Score: -4.0 (----) X-Archive-Number: 201210/69 X-Sequence-Number: 34369 hrtlik@gmail.com writes: > The following bug has been logged on the website: > Bug reference: 7590 > Logged by: Jan Vodička > Email address: hrtlik@gmail.com > PostgreSQL version: 9.2.1 > Operating system: Windows 8 > Description: > "pg_dump -Z1 my_db > backup" always make corrupted package. On Windows, that doesn't seem terribly surprising: Windows will probably do newline munging on the process's stdout, which will corrupt compressed data since it's not plain text. There's not a lot we can do to prevent that. Try it like this instead: pg_dump -Z1 -f backup.gz my_db to keep the data away from Windows' interference. regards, tom lane