"Magnus Hagander" <[EMAIL PROTECTED]> writes:
> We use non-blocking sockets in backend/port/win32/socket.c so we are
> able to deliver our "faked signals" while waiting for I/O on the socket.
> We specifically set it in pgwin32_socket().
Hm, that seems a bit grotty, but anyway I stand corrected.
> Given that, it might be a good idea to actually put the code there
> instead, to localise it. With a comment and a reference to that Q
No, I think the patch has it in the right place, because pgwin32_socket
would have no defensible way of knowing what the max send size would be.
(Indeed, with a slightly different implementation in pqcomm.c, there
would not *be* any hard upper limit; the current code wastes cycles
copying data around, when with a large message it probably should just
send() directly from the message buffer...)
I agree it needs a comment though.
>> What I would think might help is a patch on the libpq side (because it
>> *does* use a nonblocking socket) to avoid sending more than
>> 8K per WSASend call.
> It could definitly be a good idea to have a patch there *as well*, but I
> think they'd both be affected.
On the libpq side, sending large messages is probably rare except for
COPY IN mode. Has anyone noticed performance issues specifically with
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings