diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-03-08 11:25:26 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-03-08 11:25:26 -0500 |
commit | 4e0c743c18bf5435a4850510c5c74b3521c3e1e5 (patch) | |
tree | 548ba5c052c971a450f9f0bc5db10521b9946a69 /doc/src | |
parent | f9f8784c8b3050aaec52da88a6e41b3e3f576b96 (diff) |
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
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/config.sgml | 23 |
1 files changed, 14 insertions, 9 deletions
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' <para> The default value is three connections. The value must be less - than the value of <varname>max_connections</varname>. This - parameter can only be set at server start. + than <varname>max_connections</varname> minus + <xref linkend="guc-max-wal-senders"/>. + This parameter can only be set at server start. </para> </listitem> </varlistentry> @@ -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 - <xref linkend="guc-max-connections"/>. Abrupt streaming client - disconnection might cause an orphaned connection slot until + of connections, so this parameter's value must be less than + <xref linkend="guc-max-connections"/> minus + <xref linkend="guc-superuser-reserved-connections"/>. + 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. <varname>wal_level</varname> must be set to + be set at server start. + Also, <varname>wal_level</varname> must be set to <literal>replica</literal> or higher to allow connections from standby servers. </para> @@ -3007,10 +3011,11 @@ include_dir 'conf.d' (see <xref linkend="streaming-replication-slots"/>) that the server can support. The default is 10. This parameter can only be set at server start. - <varname>wal_level</varname> must be set - to <literal>replica</literal> 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, <varname>wal_level</varname> must be set + to <literal>replica</literal> or higher to allow replication slots to + be used. </para> </listitem> </varlistentry> |