Re: 0x1A in control file on Windows - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: 0x1A in control file on Windows
Date
Msg-id 200809232124.m8NLOVx06472@momjian.us
Whole thread Raw
In response to Re: 0x1A in control file on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: 0x1A in control file on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> > I found a bug that pg_controldata ends with error if control files
> > contain 0x1A (Ctrl+Z) on Windows.
> 
> > We probably need to add PG_BINARY when we open control files
> > because 0x1A is an end-of-file marker on Windows.
> 
> 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.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED
Next
From: Hannu Krosing
Date:
Subject: Re: Toasted table not deleted when no out of line columns left