Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
doc: Describe calculation method of streaming start for pg_receivewal
authorMichael Paquier <michael@paquier.xyz>
Sat, 23 Oct 2021 05:43:55 +0000 (14:43 +0900)
committerMichael Paquier <michael@paquier.xyz>
Sat, 23 Oct 2021 05:43:55 +0000 (14:43 +0900)
The documentation was imprecise about the starting LSN used for WAL
streaming if nothing can be found in the local archive directory
defined with the pg_receivewal command, so be more talkative on this
matter.

Extracted from a larger patch by the same author.

Author: Ronan Dunklau, Michael Paquier
Discussion: https://postgr.es/m/18708360.4lzOvYHigE@aivenronan
Backpatch-through: 10

doc/src/sgml/ref/pg_receivewal.sgml

index 8e07aba03290269228cbd46a814761c2777dc919..fd4e117de3465751b63106ce3186b86061ebe3b6 100644 (file)
@@ -76,6 +76,29 @@ PostgreSQL documentation
    leave at least one session available for the stream.
   </para>
 
+  <para>
+   The starting point of the write-ahead log streaming is calculated when
+   <application>pg_receivewal</application> starts:
+   <orderedlist>
+    <listitem>
+     <para>
+      First, scan the directory where the WAL segment files are written and
+      find the newest completed segment file, using as starting point the
+      beginning of the next WAL segment file. This is calculated independently
+      on the compression method used to compress each segment.
+     </para>
+    </listitem>
+
+    <listitem>
+     <para>
+      If a starting point cannot be calculated with the previous method,
+      the latest WAL flush location is used as reported by the server from
+      a <literal>IDENTIFY_SYSTEM</literal> command.
+     </para>
+    </listitem>
+   </orderedlist>
+  </para>
+
   <para>
    If the connection is lost, or if it cannot be initially established,
    with a non-fatal error, <application>pg_receivewal</application> will