recovery_target_timeline & documentation

Started by Benoit Lobréauabout 5 years ago4 messages
#1Benoit Lobréau
benoit.lobreau@gmail.com
1 attachment(s)

Hi,

It seems like this part of the documentation was not updated after changing
the default value of recovery_target_timeline to latest in v12.

"The default behavior of recovery is to recover along the same timeline
that was current when the base backup was taken. If you wish to recover
into some child timeline (that is, you want to return to some state that
was itself generated after a recovery attempt), you need to specify the
target timeline ID in recovery_target_timeline
<https://www.postgresql.org/docs/13/runtime-config-wal.html#GUC-RECOVERY-TARGET-TIMELINE&gt;.
You cannot recover into timelines that branched off earlier than the base
backup." [1]https://www.postgresql.org/docs/13/continuous-archiving.html#BACKUP-TIMELINES[2]https://www.postgresql.org/docs/12/continuous-archiving.html#BACKUP-TIMELINES

Here is an attempt to fix that.

regards,
Benoit

[1]: https://www.postgresql.org/docs/13/continuous-archiving.html#BACKUP-TIMELINES
https://www.postgresql.org/docs/13/continuous-archiving.html#BACKUP-TIMELINES
[2]: https://www.postgresql.org/docs/12/continuous-archiving.html#BACKUP-TIMELINES
https://www.postgresql.org/docs/12/continuous-archiving.html#BACKUP-TIMELINES

Attachments:

0001-Fix-recovery_target_timeline-default-in-backup.sgml.patchtext/x-patch; charset=US-ASCII; name=0001-Fix-recovery_target_timeline-default-in-backup.sgml.patchDownload
From 21bbc9badfd5bd2eeb2c702295ef9e8233ed9552 Mon Sep 17 00:00:00 2001
From: benoit <benoit.lobreau@dalibo.com>
Date: Tue, 5 Jan 2021 11:00:07 +0100
Subject: [PATCH] Fix recovery_target_timeline default in backup.sgml

---
 doc/src/sgml/backup.sgml | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 42a8ed328d..3c8aaed0b6 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -1437,12 +1437,13 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
    </para>
 
    <para>
-    The default behavior of recovery is to recover along the same timeline
-    that was current when the base backup was taken.  If you wish to recover
-    into some child timeline (that is, you want to return to some state that
-    was itself generated after a recovery attempt), you need to specify the
-    target timeline ID in <xref linkend="guc-recovery-target-timeline"/>. You cannot recover into
-    timelines that branched off earlier than the base backup.
+    The default behavior of recovery is to recover to the latest timeline found
+    in the archive. If you wish to recover to the timeline that was current
+    when the base backup was taken or into a specific child timeline (that
+    is, you want to return to some state that was itself generated after a
+    recovery attempt), you need to specify <literal>current</literal> or the
+    target timeline ID in <xref linkend="guc-recovery-target-timeline"/>. You
+    cannot recover into timelines that branched off earlier than the base backup.
    </para>
   </sect2>
 
-- 
2.25.4

#2Fujii Masao
masao.fujii@oss.nttdata.com
In reply to: Benoit Lobréau (#1)
Re: recovery_target_timeline & documentation

On 2021/01/05 20:18, Benoit Lobréau wrote:

Hi,

It seems like this part of the documentation was not updated after changing the default value of recovery_target_timeline to latest in  v12.

"The default behavior of recovery is to recover along the same timeline that was current when the base backup was taken. If you wish to recover into some child timeline (that is, you want to return to some state that was itself generated after a recovery attempt), you need to specify the target timeline ID in recovery_target_timeline <https://www.postgresql.org/docs/13/runtime-config-wal.html#GUC-RECOVERY-TARGET-TIMELINE&gt;. You cannot recover into timelines that branched off earlier than the base backup." [1][2]

Here is an attempt to fix that.

Thanks for the patch! This looks good to me. Barring any objection, I will commit it.

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

#3Fujii Masao
masao.fujii@oss.nttdata.com
In reply to: Fujii Masao (#2)
Re: recovery_target_timeline & documentation

On 2021/01/06 3:01, Fujii Masao wrote:

On 2021/01/05 20:18, Benoit Lobréau wrote:

Hi,

It seems like this part of the documentation was not updated after changing the default value of recovery_target_timeline to latest in  v12.

"The default behavior of recovery is to recover along the same timeline that was current when the base backup was taken. If you wish to recover into some child timeline (that is, you want to return to some state that was itself generated after a recovery attempt), you need to specify the target timeline ID in recovery_target_timeline <https://www.postgresql.org/docs/13/runtime-config-wal.html#GUC-RECOVERY-TARGET-TIMELINE&gt;. You cannot recover into timelines that branched off earlier than the base backup." [1][2]

Here is an attempt to fix that.

Thanks for the patch! This looks good to me. Barring any objection, I will commit it.

Pushed. Thanks!

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

#4Benoit Lobréau
benoit.lobreau@gmail.com
In reply to: Fujii Masao (#3)
Re: recovery_target_timeline & documentation

Pushed. Thanks!

Thank you !