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 11325.1350134030@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #7590: Data corruption using pg_dump only with -Z parameter  (Craig Ringer <ringerc@ringerc.id.au>)
Responses Re: BUG #7590: Data corruption using pg_dump only with -Z parameter  (Jan Vodička <hrtlik@gmail.com>)
List pgsql-bugs
Craig Ringer <ringerc@ringerc.id.au> writes:
> On 10/10/2012 02:38 AM, Tom Lane wrote:
>> 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.

> pg_dump might want to refuse to write to stdout when in a non-plain-text
> mode on Windows if that's the case.

Actually, a look at the pg_dump code says that it does

            setmode(fileno(stdout), O_BINARY);

so either my diagnosis is wrong or there's some reason why that setting
didn't take.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Craig Ringer
Date:
Subject: Re: BUG #7590: Data corruption using pg_dump only with -Z parameter
Next
From: Fujii Masao
Date:
Subject: Re: BUG #7534: walreceiver takes long time to detect n/w breakdown