Re: pg_upgrade diffs on WIndows

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade diffs on WIndows
Date: 2012-09-05 19:42:32
Message-ID: 5047AB28.9030701@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 09/05/2012 03:36 PM, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> OK, I now have a complete handle on what's going on here, and withdraw
>> my earlier statement that I am confused on this issue :-)
>> First, one lot of CRs is produced because the pg_upgrade test script
>> calls pg_dumpall without -f and redirects that to a file, which Windows
>> kindly opens on text mode. The solution to that is to change the test
>> script to use pg_dumpall -f instead.
>> The second lot of CRs (seen in the second dump file in the diff i
>> previously sent) is produced by pg_upgrade writing its output in text
>> mode, which turns LF into CRLF. The solution to that is the patch to
>> dump.c I posted, which, as Bruce observed, does the same thing that
>> pg_dumpall does. Arguably, it should also open the input file in binary,
>> so that if there really is a CRLF in the dump it won't be eaten.
> +1 to all the above. Do we want to risk squeezing this into 9.2.0,
> or is it better to delay?

When we (particularly Bruce and I) didn't fully understand what was
happening there was a good argument for delay, but now I'd rather put it
in so we can remove the error-hiding hack in the test script. I think
the risk is minimal.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2012-09-05 19:50:13 Re: pg_upgrade diffs on WIndows
Previous Message Bruce Momjian 2012-09-05 19:40:25 Re: pg_upgrade diffs on WIndows