From 7c949f1b3aab8f0cf02afa42c44a9dfc66188c70 Mon Sep 17 00:00:00 2001
From: Michael Paquier
Date: Sat, 23 Oct 2021 14:43:45 +0900
Subject: doc: Describe calculation method of streaming start for pg_receivewal
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 | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml
index cf9c41d54b0..eac9bd27838 100644
--- a/doc/src/sgml/ref/pg_receivewal.sgml
+++ b/doc/src/sgml/ref/pg_receivewal.sgml
@@ -75,6 +75,29 @@ PostgreSQL documentation
one session available for the stream.
+
+ The starting point of the write-ahead log streaming is calculated when
+ pg_receivewal starts:
+
+
+
+ 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.
+
+
+
+
+
+ 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 IDENTIFY_SYSTEM command.
+
+
+
+
+
If the connection is lost, or if it cannot be initially established,
with a non-fatal error, pg_receivewal will
--
cgit v1.2.3