From 4e0c743c18bf5435a4850510c5c74b3521c3e1e5 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 8 Mar 2018 11:25:26 -0500 Subject: 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 | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 259a2d83b4a..3a8fc7d803c 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -696,8 +696,9 @@ include_dir 'conf.d' The default value is three connections. The value must be less - than the value of max_connections. This - parameter can only be set at server start. + than max_connections minus + . + This parameter can only be set at server start. @@ -2982,13 +2983,16 @@ include_dir 'conf.d' maximum number of simultaneously running WAL sender processes). The default is 10. The value 0 means replication is disabled. WAL sender processes count towards the total number - of connections, so the parameter cannot be set higher than - . Abrupt streaming client - disconnection might cause an orphaned connection slot until + of connections, so this parameter's value must be less than + minus + . + Abrupt streaming client disconnection might leave an orphaned + connection slot behind until a timeout is reached, so this parameter should be set slightly higher than the maximum number of expected clients so disconnected clients can immediately reconnect. This parameter can only - be set at server start. wal_level must be set to + be set at server start. + Also, wal_level must be set to replica or higher to allow connections from standby servers. @@ -3007,10 +3011,11 @@ include_dir 'conf.d' (see ) that the server can support. The default is 10. This parameter can only be set at server start. - wal_level must be set - to replica or higher to allow replication slots to - be used. Setting it to a lower value than the number of currently + Setting it to a lower value than the number of currently existing replication slots will prevent the server from starting. + Also, wal_level must be set + to replica or higher to allow replication slots to + be used. -- cgit v1.2.3