Re: Streaming Replication on win32 - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Streaming Replication on win32
Date
Msg-id 3f0b79eb1002080139i62438dbke663579e430d2a7@mail.gmail.com
Whole thread Raw
In response to Re: Streaming Replication on win32  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Streaming Replication on win32  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On Mon, Jan 18, 2010 at 11:46 PM, Magnus Hagander <magnus@hagander.net> wrote:
>>> From what I can tell, this indicates that pq_getbyte_if_available() is
>>> not working - because it's supposed to never block, right?
>>
>> Right, it's not supposed to block.
>>
>>> This could be because the win32 socket emulation layer simply wasn't
>>> designed to deal with non-blocking sockets. Specifically, it actually
>>> *always* sets the socket to non-blocking mode, and then uses that to
>>> properly emulate how sockets work under unix.
>>
>> I presume the win32 emulation layer can be taught about non-blocking
>> sockets? Or maybe pq_getbyte_if_available() can be implemented using
>> some other simpler method on Windows.
>
> It could be taught that, but it would probably be a lot easier to put
> platform specific code in pq_getbyte_if_available().

Umm.. in this case, for SSL on win32 case, we also need to create
new function like my_sock_read_if_available() that receives data
from non-blocking socket, and reassign it to the SSL BIO function.
Right? If so, it seems easier for me to tell the win32 layer about
non-blocking.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Backup history file should be replicated in Streaming Replication?
Next
From: Fujii Masao
Date:
Subject: Re: Backup history file should be replicated in Streaming Replication?