doc: Additional information about timeline ID hexadecimal format
authorPeter Eisentraut <[email protected]>
Mon, 20 Mar 2023 07:48:46 +0000 (08:48 +0100)
committerPeter Eisentraut <[email protected]>
Mon, 20 Mar 2023 07:48:46 +0000 (08:48 +0100)
Timeline IDs are sometimes presented to the user in hexadecimal format
(for example in WAL file names).  Add a few bits of information to
clarify this.

Author: Sébastien Lardière <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/8fef346e-2541-76c3-d768-6536ae052993@lardiere.net

doc/src/sgml/backup.sgml
doc/src/sgml/config.sgml

index be05a332050d67264e6f1635b5b3f0dacdf46888..8cb24d6ae542f4e20e5dfd6d9f6a157bf3a4688a 100644 (file)
@@ -1309,7 +1309,16 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
     a new timeline is created to identify the series of WAL records
     generated after that recovery.  The timeline
     ID number is part of WAL segment file names so a new timeline does
-    not overwrite the WAL data generated by previous timelines.  It is
+    not overwrite the WAL data generated by previous timelines.
+    For example, in the WAL file name
+    <filename>0000000100001234000055CD</filename>, the leading
+    <literal>00000001</literal> is the timeline ID in hexadecimal.  (Note that
+    in other contexts, such as server log messages, timeline IDs are
+    usually printed in decimal.)
+   </para>
+
+   <para>
+    It is
     in fact possible to archive many different timelines.  While that might
     seem like a useless feature, it's often a lifesaver.  Consider the
     situation where you aren't quite sure what point-in-time to recover to,
index e5c41cc6c6d61c63b2da572bf13056b15015f66e..481f93cea1bc0465d4c10979d9cfa35d4bd8f0bd 100644 (file)
@@ -4113,6 +4113,14 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
         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