Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: 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 01:56:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-hackers
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.  The
discussion here is about *text* files, particularly configuration
files.  Why should we not adhere to the platform standard about
what a text file is?

If you need a positive reason why this might be a bad idea, consider the
idea that someone is examining postgresql.conf with a text editor that
stops reading at control-Z.  He might not be able to see items that the
postmaster is treating as valid.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2008-09-24 01:58:36
Subject: Re: Toasted table not deleted when no out of line columns left
Previous:From: Tom LaneDate: 2008-09-24 01:45:24
Subject: Re: Common Table Expressions (WITH RECURSIVE) patch

pgsql-bugs by date

Next:From: Andrew DunstanDate: 2008-09-24 02:17:46
Subject: Re: [HACKERS] 0x1A in control file on Windows
Previous:From: toruvinnDate: 2008-09-23 22:51:01
Subject: Re: BUG #4433: entries like "host all all ..." should not be allowed or trigger a warning

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group