Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to - Mailing list pgsql-patches

From Andrew Dunstan
Subject Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to
Date
Msg-id 411D5F3D.4090606@dunslane.net
Whole thread Raw
In response to Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to Windows]  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] [Fwd: Re: [pgsql-hackers-win32] Import from Linux to  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches

Tom Lane wrote:

>Andrew Dunstan <andrew@dunslane.net> writes:
>
>
>>>The attached patch appears to solve the problem. However, while it
>>>makes us conform to the first sentence below from the docs, it doesn't
>>>comply with the second. Not sure what to do about that. Maybe there's
>>>a better solution?
>>>
>>>
>
>
>
>>Attached patch seems much better, I think.
>>
>>
>
>I think it is still not quite there.  Since as you noted the backend
>will complain if line endings don't match, if we hit EOF then we have
>to cons up a \. line with the correct ending.  (BTW, this is not
>actually necessary when talking 3.0 protocol, but it is when talking
>to an older server.)
>
>I modified the patch a little more and applied the attached.  It seems
>to work for me but could use more testing.
>
>
>
>

WorksForMe, and looks good. You're right, I had forgotten the EOF case.

Should it be backported for the upcoming stable release(s)? Bruce and I
were discussing this earlier.

Pro: it's an ugly bug and hard to diagnose - things just seem to die for
no apparent reason.
Con: there's a workaround - just make sure to run dos2unix on your file
if necessary.

cheers

andrew

pgsql-patches by date:

Previous
From: "Simon@2ndquadrant.com"
Date:
Subject: Re: [HACKERS] Point in Time Recovery
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Point in Time Recovery