mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
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
This commit is contained in:
@ -1873,6 +1873,7 @@ static struct config_int ConfigureNamesInt[] =
|
||||
},
|
||||
|
||||
{
|
||||
/* see max_connections and max_wal_senders */
|
||||
{"superuser_reserved_connections", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
|
||||
gettext_noop("Sets the number of connection slots reserved for superusers."),
|
||||
NULL
|
||||
@ -2375,7 +2376,7 @@ static struct config_int ConfigureNamesInt[] =
|
||||
},
|
||||
|
||||
{
|
||||
/* see max_connections */
|
||||
/* see max_connections and superuser_reserved_connections */
|
||||
{"max_wal_senders", PGC_POSTMASTER, REPLICATION_SENDING,
|
||||
gettext_noop("Sets the maximum number of simultaneously running WAL sender processes."),
|
||||
NULL
|
||||
@ -2386,7 +2387,7 @@ static struct config_int ConfigureNamesInt[] =
|
||||
},
|
||||
|
||||
{
|
||||
/* see max_connections */
|
||||
/* see max_wal_senders */
|
||||
{"max_replication_slots", PGC_POSTMASTER, REPLICATION_SENDING,
|
||||
gettext_noop("Sets the maximum number of simultaneously defined replication slots."),
|
||||
NULL
|
||||
|
Reference in New Issue
Block a user