Home Explore Blog CI



postgresql

65th chunk of `doc/src/sgml/config.sgml`
09ca74589142ff1d94fee5f2b18072d12a87d0a1486d97c50000000100000fac
 which is useful in
        a standby server.  <literal>latest</literal> is the default.
       </para>

       <para>
        To specify a timeline ID in hexadecimal (for example, if extracted
        from a WAL file name or history file), prefix it with a
        <literal>0x</literal>.  For instance, if the WAL file name is
        <filename>00000011000000A10000004F</filename>, then the timeline ID is
        <literal>0x11</literal> (or 17 decimal).
       </para>

       <para>
        You usually only need to set this parameter
        in complex re-recovery situations, where you need to return to
        a state that itself was reached after a point-in-time recovery.
        See <xref linkend="backup-timelines"/> for discussion.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="guc-recovery-target-action"
                   xreflabel="recovery_target_action">
      <term><varname>recovery_target_action</varname> (<type>enum</type>)
      <indexterm>
        <primary><varname>recovery_target_action</varname> configuration parameter</primary>
      </indexterm>
      </term>
      <listitem>
       <para>
        Specifies what action the server should take once the recovery target is
        reached. The default is <literal>pause</literal>, which means recovery will
        be paused. <literal>promote</literal> means the recovery process will finish
        and the server will start to accept connections.
        Finally <literal>shutdown</literal> will stop the server after reaching the
        recovery target.
       </para>
       <para>
        The intended use of the <literal>pause</literal> setting is to allow queries
        to be executed against the database to check if this recovery target
        is the most desirable point for recovery.
        The paused state can be resumed by
        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.
       </para>
       <para>
        The <literal>shutdown</literal> setting is useful to have the instance ready
        at the exact replay point desired.  The instance will still be able to
        replay more WAL records (and in fact will have to replay WAL records
        since the last checkpoint next time it is started).
       </para>
       <para>
        Note that because <filename>recovery.signal</filename> will not be
        removed when <varname>recovery_target_action</varname> is set to <literal>shutdown</literal>,
        any subsequent start will end with immediate shutdown unless the
        configuration is changed or the <filename>recovery.signal</filename>
        file is removed manually.
       </para>
       <para>
        This setting has no effect if no recovery target is set.
        If <xref linkend="guc-hot-standby"/> is not enabled, a setting of
        <literal>pause</literal> will act the same as <literal>shutdown</literal>.
        If the recovery target is reached while a promotion is ongoing,
        a setting of <literal>pause</literal> will act the same as
        <literal>promote</literal>.
       </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
        with a fatal error.
       </para>
      </listitem>
     </varlistentry>

    </variablelist>
   </sect2>

   <sect2 id="runtime-config-wal-summarization">
    <title>WAL Summarization</title>

    <para>
     These settings control WAL summarization, a feature which must be
     enabled in order to perform an
     <link linkend="backup-incremental-backup">incremental backup</link>.
    </para>

    <variablelist>
     <varlistentry id="guc-summarize-wal"

Title: Recovery Target Timeline and Action Parameters
Summary
This section details the `recovery_target_timeline` parameter, which allows specifying a particular timeline for recovery, including options for hexadecimal timeline IDs and complex re-recovery situations. It then describes the `recovery_target_action` parameter, which determines the server's action upon reaching the recovery target, with options to 'pause' for inspection, 'promote' to finish recovery and accept connections, or 'shutdown' to stop the server. It explains the implications and uses of each action, particularly for standby servers and point-in-time recovery.