Re: SO_SNDBUF size is small on win32?

From: Yoshiyuki Asaba <y-asaba(at)sraoss(dot)co(dot)jp>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: mha(at)sollentuna(dot)net, andrew(at)dunslane(dot)net, kleptog(at)svana(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SO_SNDBUF size is small on win32?
Date: 2006-06-28 12:27:42
Message-ID: 20060628.212742.74752930.y-asaba@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Hi,

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [HACKERS] SO_SNDBUF size is small on win32?
Date: Tue, 27 Jun 2006 14:43:57 -0400

> >> 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
> COPY IN?

I think libpq interface does not use non-blocking socket. Because
'FRONTEND' symbol is enabled.

src/include/port/win32.h
#ifndef FRONTEND
#define socket(af, type, protocol) pgwin32_socket(af, type, protocol)
#define accept(s, addr, addrlen) pgwin32_accept(s, addr, addrlen)
#define connect(s, name, namelen) pgwin32_connect(s, name, namelen)
#define select(n, r, w, e, timeout) pgwin32_select(n, r, w, e, timeout)
#define recv(s, buf, len, flags) pgwin32_recv(s, buf, len, flags)
#define send(s, buf, len, flags) pgwin32_send(s, buf, len, flags)

I think this is only server-side problem. Is this right?

Regards,

--
Yoshiyuki Asaba
y-asaba(at)sraoss(dot)co(dot)jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-06-28 13:54:21 Re: SO_SNDBUF size is small on win32?
Previous Message Tzahi Fadida 2006-06-28 12:25:57 Help with casting and comparing.

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-06-28 13:54:21 Re: SO_SNDBUF size is small on win32?
Previous Message Magnus Hagander 2006-06-28 09:23:28 Re: Client build of MSVC6+ patch