Re: [HACKERS] 0x1A in control file on Windows

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [HACKERS] 0x1A in control file on Windows
Date: 2008-09-24 09:02:55
Message-ID: 48DA023F.5090007@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Magnus Hagander wrote:
> Andrew Dunstan wrote:
>>
>> Tom Lane wrote:
>>> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>>>
>>>> Tom Lane wrote:
>>>>
>>>>> Well, why is that a bug? If the platform is so silly as to define text
>>>>> files that way, who are we to argue?
>>>>>
>>>
>>>> The problem is that our pg_controldata might have binary values that
>>>> contain 0x1a that will be confused by the operating system as
>>>> end-of-file.
>>>>
>>> pg_controldata is certainly already being read as binary.
>> Umm, no, it is in the backend I believe but not in the utilities. Hence
>> the original bug report. We need to add the binary flag in
>> pg_controldata.c and pg_resetxlog.c.
>
> Right.
> I'll go ahead and put that part in (I find two locations - the one in
> the original patch, and the extra one Heikki noticed).

Eh, both were in the original patch, I just didn't scroll far enough :-)

Applied to HEAD and backpatched back to 8.2 - since it only affects
Windows, we don't go further.

//Magnus

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2008-09-24 13:18:13 Re: [HACKERS] 0x1A in control file on Windows
Previous Message Alex Hunsaker 2008-09-24 07:38:01 Re: BUG #4434: Error inserting into view - unrecognized node type: 313

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2008-09-24 09:11:41 Re: Solve a problem of LC_TIME of windows.
Previous Message Heikki Linnakangas 2008-09-24 07:57:54 Re: FSM, now without WAL-logging