Re: Streaming Replication on win32
От | Fujii Masao |
---|---|
Тема | Re: Streaming Replication on win32 |
Дата | |
Msg-id | 3f0b79eb1001180130x2e02679cib032b24eb545b84@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Streaming Replication on win32 (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>) |
Ответы |
Re: Streaming Replication on win32
|
Список | pgsql-hackers |
On Mon, Jan 18, 2010 at 5:22 AM, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote: >> 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. How about checking the socket by using select/poll before calling pq_getbyte_if_available()? This would prevent pgwin32_recv() from being blocked because a message is guaranteed to have already arrived. When the renegotiation happens, SSL_read (instead of pqwin32_recv()) is called with non-blocking socket, so it's not blocked. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
В списке pgsql-hackers по дате отправления: