Remove our artificial PG_SOMAXCONN limit on listen queue length.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 23 Aug 2022 14:14:45 +0000 (10:14 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 23 Aug 2022 14:15:06 +0000 (10:15 -0400)
commit0f47457f1129fa21131465aba5663a14b2a09386
tree37d4d753337c23dd0124924e239ca2a3c566051e
parentba94dfd4c4f63cf8663f16e427bcc6fac35a4428
Remove our artificial PG_SOMAXCONN limit on listen queue length.

I added this in commit 153f40067, out of paranoia about kernels
possibly rejecting very large listen backlog requests.  However,
POSIX has said for decades that the kernel must silently reduce
any value it considers too large, and there's no evidence that
any current system doesn't obey that.  Let's just drop this limit
and save some complication.

While we're here, compute the request as twice MaxConnections not
twice MaxBackends; the latter no longer means what it did in 2001.

Per discussion of a report from Kevin McKibbin.

Discussion: https://postgr.es/m/CADc_NKg2d+oZY9mg4DdQdoUcGzN2kOYXBu-3--RW_hEe0tUV=g@mail.gmail.com
src/backend/libpq/pqcomm.c
src/include/pg_config_manual.h