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

From Zeugswetter Andreas SB
Subject AW: Re: SOMAXCONN (was Re: Solaris source code)
Date
Msg-id 11C1E6749A55D411A9670001FA687963368385@sdexcsrv1.f000.d0188.sd.spardat.at
Whole thread Raw
Responses Re: Re: SOMAXCONN
List pgsql-hackers
> When the system is too heavily loaded (however measured), any further 
> login attempts will fail.  What I suggested is, instead of the 
> postmaster accept()ing the connection, why not leave the connection 
> attempt in the queue until we can afford a back end to handle it?  

Because the clients would time out ?

> Then, the argument to listen() will determine how many attempts can 
> be in the queue before the network stack itself rejects them without 
> the postmaster involved.

You cannot change the argument to listen() at runtime, or are you suggesting
to close and reopen the socket when maxbackends is reached ? I think 
that would be nonsense.

I liked the idea of min(MaxBackends, PG_SOMAXCONN), since there is no use in 
accepting more than your total allowed connections concurrently.

Andreas


pgsql-hackers by date:

Previous
From: Zeugswetter Andreas SB
Date:
Subject: AW: Re: [GENERAL] Vacuum and Transactions
Next
From: mlw
Date:
Subject: Re: AW: Re: SOMAXCONN (was Re: Solaris source code)