diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-03-27 19:43:41 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-03-27 19:51:37 -0300 |
commit | 1e6148032e4d27aec75c49264b47ad193405a919 (patch) | |
tree | f06cf0c0c4204ed8308fa983bfdb6068c5f0e2f4 /doc/src | |
parent | 092c6936de49effe63daad94855bcd8ef26a09dd (diff) |
Allow walreceiver configuration to change on reload
The parameters primary_conninfo, primary_slot_name and
wal_receiver_create_temp_slot can now be changed with a simple "reload"
signal, no longer requiring a server restart. This is achieved by
signalling the walreceiver process to terminate and having it start
again with the new values.
Thanks to Andres Freund, Kyotaro Horiguchi, Fujii Masao for discussion.
Author: Sergei Kornilov <sk@zsrv.org>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/19513901543181143@sas1-19a94364928d.qloud-c.yandex.net
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/config.sgml | 23 | ||||
-rw-r--r-- | doc/src/sgml/high-availability.sgml | 4 |
2 files changed, 20 insertions, 7 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index b5de6c32376..557af3cf6ee 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -4028,7 +4028,12 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <varname>primary_conninfo</varname> string. </para> <para> - This parameter can only be set at server start. + This parameter can only be set in the <filename>postgresql.conf</filename> + file or on the server command line. + If this parameter is changed while the WAL receiver process is + running, that process is signalled to shut down and expected to + restart with the new setting (except if <varname>primary_conninfo</varname> + is an empty string). This setting has no effect if the server is not in standby mode. </para> </listitem> @@ -4045,9 +4050,13 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" connecting to the sending server via streaming replication to control resource removal on the upstream node (see <xref linkend="streaming-replication-slots"/>). - This parameter can only be set at server start. + This parameter can only be set in the <filename>postgresql.conf</filename> + file or on the server command line. + If this parameter is changed while the WAL receiver process is running, + that process is signalled to shut down and expected to restart with the + new setting. This setting has no effect if <varname>primary_conninfo</varname> is not - set. + set or the server is not in standby mode. </para> </listitem> </varlistentry> @@ -4160,10 +4169,14 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" </term> <listitem> <para> - Specifies whether a WAL receiver should create a temporary replication + Specifies whether the WAL receiver process should create a temporary replication slot on the remote instance when no permanent replication slot to use has been configured (using <xref linkend="guc-primary-slot-name"/>). - The default is off. This parameter can only be set at server start. + The default is off. This parameter can only be set in the + <filename>postgresql.conf</filename> file or on the server command line. + If this parameter is changed while the WAL receiver process is running, + that process is signalled to shut down and expected to restart with + the new setting. </para> </listitem> </varlistentry> diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index bc4d98fe039..bb5d9962ed3 100644 --- a/doc/src/sgml/high-availability.sgml +++ b/doc/src/sgml/high-availability.sgml @@ -816,8 +816,8 @@ archive_cleanup_command = 'pg_archivecleanup /path/to/archive %r' When the standby is started and <varname>primary_conninfo</varname> is set correctly, the standby will connect to the primary after replaying all WAL files available in the archive. If the connection is established - successfully, you will see a walreceiver process in the standby, and - a corresponding walsender process in the primary. + successfully, you will see a <literal>walreceiver</literal> in the standby, and + a corresponding <literal>walsender</literal> process in the primary. </para> <sect3 id="streaming-replication-authentication"> |