From c1491574e20e07e2b45e95a63913713e9c2ca29c Mon Sep 17 00:00:00 2001
From: Rushabh Lathia <rushabh.lathia@enterprisedb.com>
Date: Fri, 22 Nov 2019 15:18:15 +0530
Subject: [PATCH 5/5] Documentation for backup manifest and
 manifest-with-checksums.

---
 doc/src/sgml/protocol.sgml          | 23 ++++++++++++++++++++---
 doc/src/sgml/ref/pg_basebackup.sgml | 11 +++++++++++
 2 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 8027521..f54162e 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -2466,15 +2466,19 @@ The commands accepted in replication mode are:
   </varlistentry>
 
   <varlistentry>
-    <term><literal>BASE_BACKUP</literal> [ <literal>LABEL</literal> <replaceable>'label'</replaceable> ] [ <literal>PROGRESS</literal> ] [ <literal>FAST</literal> ] [ <literal>WAL</literal> ] [ <literal>NOWAIT</literal> ] [ <literal>MAX_RATE</literal> <replaceable>rate</replaceable> ] [ <literal>TABLESPACE_MAP</literal> ] [ <literal>NOVERIFY_CHECKSUMS</literal> ]
+    <term><literal>BASE_BACKUP</literal> [ <literal>LABEL</literal> <replaceable>'label'</replaceable> ] [ <literal>PROGRESS</literal> ] [ <literal>FAST</literal> ] [ <literal>WAL</literal> ] [ <literal>NOWAIT</literal> ] [ <literal>MAX_RATE</literal> <replaceable>rate</replaceable> ] [ <literal>TABLESPACE_MAP</literal> ] [ <literal>NOVERIFY_CHECKSUMS</literal> ] [ <literal>MANIFEST_WITH_CHECKSUMS</literal> ]
      <indexterm><primary>BASE_BACKUP</primary></indexterm>
     </term>
     <listitem>
      <para>
       Instructs the server to start streaming a base backup.
       The system will automatically be put in backup mode before the backup
-      is started, and taken out of it when the backup is complete. The
-      following options are accepted:
+      is started, and taken out of it when the backup is complete.  This also
+      store a manifest as part of each backup under the backup folder in a
+      file named backup_manifest.  This file contains the list of files, and
+      the lengths of those files, file modified time and optional checksum
+      for each file as well as for a manifest file.The following options are
+      accepted:
       <variablelist>
        <varlistentry>
         <term><literal>LABEL</literal> <replaceable>'label'</replaceable></term>
@@ -2576,6 +2580,19 @@ The commands accepted in replication mode are:
          </para>
         </listitem>
        </varlistentry>
+
+       <varlistentry>
+        <term><literal>MANIFEST_WITH_CHECKSUMS</literal></term>
+        <listitem>
+         <para>
+          By default, checksum for each backup file in backup manifest file is
+          off. Specifying <literal>MANIFEST_WITH_CHECKSUMS</literal> enables
+          the checksum for each backup file in backup manifest file as well as
+          for manifest file itself.
+         </para>
+        </listitem>
+       </varlistentry>
+
       </variablelist>
      </para>
      <para>
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index fc9e222..1db2a68 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -536,6 +536,17 @@ PostgreSQL documentation
        </para>
       </listitem>
      </varlistentry>
+
+     <varlistentry>
+      <term><option>--manifest-with-checksum</option></term>
+      <listitem>
+       <para>
+        Enables a checksum for the each backup file in manifest file as well as
+        for manifest file itself.
+       </para>
+      </listitem>
+     </varlistentry>
+
     </variablelist>
    </para>
 
-- 
1.8.3.1

