SOMAXCONN (was Re: Solaris source code) - Mailing list pgsql-hackers

From Tom Lane
Subject SOMAXCONN (was Re: Solaris source code)
Date
Msg-id 29600.994787475@sss.pgh.pa.us
Whole thread Raw
In response to Re: Solaris source code  (Mathijs Brands <mathijs@ilse.nl>)
Responses Re: SOMAXCONN (was Re: Solaris source code)  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Mathijs Brands <mathijs@ilse.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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: AW: pg_index.indislossy
Next
From: Alex Pilosov
Date:
Subject: selecting from cursor/function