Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 58 additions & 4 deletions doc/src/sgml/config.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -4253,7 +4253,10 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
<varname>recovery_target_time</varname>, or <varname>recovery_target_xid</varname>
can be used; if more than one of these is specified in the configuration
file, an error will be raised.
These parameters can only be set at server start.
These parameters can be changed by reloading the server configuration
without requiring a restart, except for
<varname>recovery_target_timeline</varname> which can only be set at
server start.
</para>

<variablelist>
Expand All @@ -4274,6 +4277,9 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
Technically, this is a string parameter, but <literal>'immediate'</literal>
is currently the only allowed value.
</para>
<para>
This parameter can be changed by reloading the server configuration.
</para>
</listitem>
</varlistentry>

Expand All @@ -4288,6 +4294,9 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
This parameter specifies the named restore point (created with
<function>pg_create_restore_point()</function>) to which recovery will proceed.
</para>
<para>
This parameter can be changed by reloading the server configuration.
</para>
</listitem>
</varlistentry>

Expand All @@ -4314,6 +4323,29 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
numeric offset from UTC, or you can write a full time zone name,
e.g., <literal>Europe/Helsinki</literal> not <literal>EEST</literal>.
</para>

<para>
This parameter can be changed by reloading the server configuration
(for example, via <function>pg_reload_conf()</function>) without
requiring a server restart.
</para>

<para>
The value is re-parsed under the current
<xref linkend="guc-timezone"/> setting on each reload. To avoid
ambiguity, use an explicit time zone offset, e.g.,
<literal>'2024-01-15 10:30:00+00'</literal>, to ensure deterministic
behavior regardless of the server's timezone configuration.
</para>

<para>
When <xref linkend="guc-recovery-target-action"/> is set to
<literal>pause</literal> and recovery is paused at the target,
changing <varname>recovery_target_time</varname> to a later value
and reloading the configuration will automatically resume WAL replay
toward the new target. Setting it to an equal or earlier value while
paused is a no-op.
</para>
</listitem>
</varlistentry>

Expand Down Expand Up @@ -4349,6 +4381,9 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
The effective transaction ID (the 32-bit portion) must be greater than
or equal to 3.
</para>
<para>
This parameter can be changed by reloading the server configuration.
</para>
</listitem>
</varlistentry>

Expand All @@ -4366,6 +4401,13 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
parameter is parsed using the system data type
<link linkend="datatype-pg-lsn"><type>pg_lsn</type></link>.
</para>
<para>
This parameter can be changed by reloading the server configuration.
When <xref linkend="guc-recovery-target-action"/> is set to
<literal>pause</literal> and recovery is paused at the target,
advancing the LSN to a later value and reloading the configuration
will automatically resume WAL replay toward the new target.
</para>
</listitem>
</varlistentry>
</variablelist>
Expand Down Expand Up @@ -4395,6 +4437,10 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
having exactly the target WAL location (LSN), commit time, or transaction ID, respectively, will
be included in the recovery. Default is <literal>on</literal>.
</para>
<para>
This parameter can be changed by reloading the server configuration.
The new value takes effect on the next recovery stop evaluation.
</para>
</listitem>
</varlistentry>

Expand Down Expand Up @@ -4430,6 +4476,9 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
a state that itself was reached after a point-in-time recovery.
See <xref linkend="backup-timelines"/> for discussion.
</para>
<para>
This parameter can only be set at server start.
</para>
</listitem>
</varlistentry>

Expand Down Expand Up @@ -4457,9 +4506,8 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
using <function>pg_wal_replay_resume()</function> (see
<xref linkend="functions-recovery-control-table"/>), which then
causes recovery to end. If this recovery target is not the
desired stopping point, then shut down the server, change the
recovery target settings to a later target and restart to
continue recovery.
desired stopping point, change the recovery target settings to a
later target and reload the configuration to continue recovery.
</para>
<para>
The <literal>shutdown</literal> setting is useful to have the instance ready
Expand All @@ -4482,6 +4530,12 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
a setting of <literal>pause</literal> will act the same as
<literal>promote</literal>.
</para>
<para>
This parameter can be changed by reloading the server configuration.
For example, changing from <literal>pause</literal> to
<literal>promote</literal> while recovery is paused at the target
will trigger promotion.
</para>
<para>
In any case, if a recovery target is configured but the archive
recovery ends before the target is reached, the server will shut down
Expand Down
Loading