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

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

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