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

Re: pipe chunking vs Windows

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pipe chunking vs Windows
Date: 2007-07-29 13:18:48
Message-ID: 46AC93B8.1010608@hagander.net (view raw or flat)
Thread:
Lists: pgsql-hackers
Andrew Dunstan wrote:
> 
> I have just discovered that the recently implemented pipe chunking
> protocol is broken on Windows. This is because the pipes are operating
> in text mode and doing LF->CR-LF translation, so the number of bytes
> received is not the number transmitted and set in the protocol header.
> 
> I have not yet succeeded in turning this behaviour off (_setmode()
> didn't seem to affect it). If we can't find a way to turn it off, the
> only solution short of abandoning its use on Windows that I can think of
> is to translate LF on input to something unlikely like 0x1C and then
> translate it back when we read it from the pipe.

At what point does it actually do the translation? Meaning what
system/library call has it?

Are we using the pipes from src/port/pipe.c? It does sound a bit weird
that they'd do that, since it's basically just emulating stuff over
standard tcp sockets, but perhaps something is broken in that code?

Sorry, haven't really checked up on the chunk code yet, so I don't know
offhand where to look.

//Magnus

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2007-07-29 14:37:16
Subject: Re: stats_block_level
Previous:From: Andrew DunstanDate: 2007-07-29 12:46:08
Subject: pipe chunking vs Windows

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