Re: BUG #7590: Data corruption using pg_dump only with -Z parameter - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #7590: Data corruption using pg_dump only with -Z parameter
Date
Msg-id 2464.1349807895@sss.pgh.pa.us
Whole thread Raw
In response to BUG #7590: Data corruption using pg_dump only with -Z parameter  (hrtlik@gmail.com)
Responses Re: BUG #7590: Data corruption using pg_dump only with -Z parameter  (Jan Vodička <hrtlik@gmail.com>)
Re: BUG #7590: Data corruption using pg_dump only with -Z parameter  (Craig Ringer <ringerc@ringerc.id.au>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #7591: Large query string has limit
Next
From: Ryan Kelly
Date:
Subject: Re: BUG #7590: Data corruption using pg_dump only with -Z parameter