]> granicus.if.org Git - postgresql/commit
Fix cross-checking of ReservedBackends/max_wal_senders/MaxConnections.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 8 Mar 2018 16:25:26 +0000 (11:25 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 8 Mar 2018 16:25:26 +0000 (11:25 -0500)
commit4e0c743c18bf5435a4850510c5c74b3521c3e1e5
tree548ba5c052c971a450f9f0bc5db10521b9946a69
parentf9f8784c8b3050aaec52da88a6e41b3e3f576b96
Fix cross-checking of ReservedBackends/max_wal_senders/MaxConnections.

We were independently checking ReservedBackends < MaxConnections and
max_wal_senders < MaxConnections, but because walsenders aren't allowed
to use superuser-reserved connections, that's really the wrong thing.
Correct behavior is to insist on ReservedBackends + max_wal_senders being
less than MaxConnections.  Fix the code and associated documentation.

This has been wrong for a long time, but since the situation probably
hardly ever arises in the field (especially pre-v10, when the default
for max_wal_senders was zero), no back-patch.

Discussion: https://postgr.es/m/28271.1520195491@sss.pgh.pa.us
doc/src/sgml/config.sgml
src/backend/postmaster/postmaster.c
src/backend/utils/init/postinit.c
src/backend/utils/misc/guc.c