From 845b2fdd33318f0d7528ef0ecbb69e4aecf43c46 Mon Sep 17 00:00:00 2001 From: Ronan Dunklau Date: Mon, 6 Sep 2021 11:08:54 +0200 Subject: [PATCH v7 3/3] Add documentation for pg_receivewal --- doc/src/sgml/ref/pg_receivewal.sgml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml index 45b544cf49..5fb2b61d34 100644 --- a/doc/src/sgml/ref/pg_receivewal.sgml +++ b/doc/src/sgml/ref/pg_receivewal.sgml @@ -37,6 +37,32 @@ PostgreSQL documentation ). + + When pg_receivewal is launched, it tries to determine the + starting LSN from the following sources: + + + + It scans the target directory to determine the next file it should archive. + + + + + + If it doesn't find that file, and a slot was specified, it uses the + READ_REPLICATION_SLOT command to retrieve the slot's restart_lsn + + + + + + If it still don't find a valid start position via READ_REPLICATION_SLOT, + it uses the last flush location as reported by the server. + + + + + pg_receivewal streams the write-ahead log in real time as it's being generated on the server, and does not wait -- 2.33.0