Skip to content

Commit e6c5f1b

Browse files
committed
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
1 parent 871dfe4 commit e6c5f1b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

doc/src/sgml/ref/pg_receivewal.sgml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,29 @@ PostgreSQL documentation
7676
leave at least one session available for the stream.
7777
</para>
7878

79+
<para>
80+
The starting point of the write-ahead log streaming is calculated when
81+
<application>pg_receivewal</application> starts:
82+
<orderedlist>
83+
<listitem>
84+
<para>
85+
First, scan the directory where the WAL segment files are written and
86+
find the newest completed segment file, using as starting point the
87+
beginning of the next WAL segment file. This is calculated independently
88+
on the compression method used to compress each segment.
89+
</para>
90+
</listitem>
91+
92+
<listitem>
93+
<para>
94+
If a starting point cannot be calculated with the previous method,
95+
the latest WAL flush location is used as reported by the server from
96+
a <literal>IDENTIFY_SYSTEM</literal> command.
97+
</para>
98+
</listitem>
99+
</orderedlist>
100+
</para>
101+
79102
<para>
80103
If the connection is lost, or if it cannot be initially established,
81104
with a non-fatal error, <application>pg_receivewal</application> will

0 commit comments

Comments
 (0)