On 2021/04/22 9:25, Kyotaro Horiguchi wrote:
What about the following description?

-------------------
When you are using -X none, if write activity on the primary is low,
pg_basebackup may need to wait a long time for all WAL files required
for
the backup to be archived. It may be useful to run pg_switch_wal
on the primary in order to trigger an immediate WAL file switch and
archiving.
-------------------

Looks far better.

Patch attached. I appended the following description to assist
users to understand why pg_basebackup may need wait a long time
when write activity is low on the primary.

------------------
pg_basebackup cannot force the standby to switch to
a new WAL file at the end of backup.
------------------

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml 
b/doc/src/sgml/ref/pg_basebackup.sgml
index a3e292d44a..9e6807b457 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -83,8 +83,14 @@ PostgreSQL documentation
     </listitem>
     <listitem>
      <para>
-      If you are using <literal>-X none</literal>, there is no guarantee that 
all
-      WAL files required for the backup are archived at the end of backup.
+      <application>pg_basebackup</application> cannot force the standby
+      to switch to a new WAL file at the end of backup.
+      When you are using <literal>-X none</literal>, if write activity on
+      the primary is low, <application>pg_basebackup</application> may
+      need to wait a long time for the last WAL file required for the backup
+      to be switched and archived.  In this case, it may be useful to run
+      <function>pg_switch_wal</function> on the primary in order to
+      trigger an immediate WAL file switch.
      </para>
     </listitem>
     <listitem>

Reply via email to