Re: SOMAXCONN (was Re: Solaris source code)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Mathijs Brands <mathijs(at)ilse(dot)nl>, Nathan Myers <ncm(at)zembu(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SOMAXCONN (was Re: Solaris source code)
Date: 2001-07-10 21:06:28
Message-ID: 200107102106.f6AL6Sq08571@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Mathijs Brands <mathijs(at)ilse(dot)nl> writes:
> > OK, I tried using 1024 (and later 128) instead of SOMAXCONN (defined to
> > be 5 on Solaris) in src/backend/libpq/pqcomm.c and ran a few regression
> > tests on two different Sparc boxes (Solaris 7 and 8). The regression
> > test still fails, but for a different reason. The abstime test fails;
> > not only on Solaris but also on FreeBSD (4.3-RELEASE).
>
> The abstime diff is to be expected (if you look closely, the test is
> comparing 'current' to 'June 30, 2001'. Ooops). If that's the only
> diff then you are in good shape.
>
>
> Based on this and previous discussions, I am strongly tempted to remove
> the use of SOMAXCONN and instead use, say,
>
> #define PG_SOMAXCONN 1000
>
> defined in config.h.in. That would leave room for configure to twiddle
> it, if that proves necessary. Does anyone know of a platform where this
> would cause problems? AFAICT, all versions of listen(2) are claimed to
> be willing to reduce the passed parameter to whatever they can handle.

Could we test SOMAXCONN and set PG_SOMAXCONN to 1000 only if SOMAXCONN1
is less than 1000?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-07-10 21:15:06 Re: grant and SQL92
Previous Message Tom Lane 2001-07-10 20:38:39 Re: Buffer access rules, and a probable bug