Code review for backup manifest.
This commit prevents pg_basebackup from receiving backup_manifest file when --no-manifest is specified. Previously, when pg_basebackup was writing a tarfile to stdout, it tried to receive backup_manifest file even when --no-manifest was specified, and reported an error. Also remove unused -m option from pg_basebackup. Also fix typo in BASE_BACKUP command documentation. Author: Fujii Masao Reviewed-by: Michael Paquier, Robert Haas Discussion: https://postgr.es/m/01e3ed3a-8729-5aaa-ca84-e60e3ca59db8@oss.nttdata.com
This commit is contained in:
parent
4a05a64095
commit
a2ac73e7be
@ -2578,19 +2578,19 @@ The commands accepted in replication mode are:
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><literal>MANIFEST</literal></term>
|
<term><literal>MANIFEST</literal> <replaceable>manifest_option</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
When this option is specified with a value of <literal>yes</literal>
|
When this option is specified with a value of <literal>yes</literal>
|
||||||
or <literal>force-escape</literal>, a backup manifest is created
|
or <literal>force-encode</literal>, a backup manifest is created
|
||||||
and sent along with the backup. The manifest is a list of every
|
and sent along with the backup. The manifest is a list of every
|
||||||
file present in the backup with the exception of any WAL files that
|
file present in the backup with the exception of any WAL files that
|
||||||
may be included. It also stores the size, last modification time, and
|
may be included. It also stores the size, last modification time, and
|
||||||
an optional checksum for each file.
|
an optional checksum for each file.
|
||||||
A value of <literal>force-escape</literal> forces all filenames
|
A value of <literal>force-encode</literal> forces all filenames
|
||||||
to be hex-encoded; otherwise, this type of encoding is performed only
|
to be hex-encoded; otherwise, this type of encoding is performed only
|
||||||
for files whose names are non-UTF8 octet sequences.
|
for files whose names are non-UTF8 octet sequences.
|
||||||
<literal>force-escape</literal> is intended primarily for testing
|
<literal>force-encode</literal> is intended primarily for testing
|
||||||
purposes, to be sure that clients which read the backup manifest
|
purposes, to be sure that clients which read the backup manifest
|
||||||
can handle this case. For compatibility with previous releases,
|
can handle this case. For compatibility with previous releases,
|
||||||
the default is <literal>MANIFEST 'no'</literal>.
|
the default is <literal>MANIFEST 'no'</literal>.
|
||||||
@ -2599,7 +2599,7 @@ The commands accepted in replication mode are:
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><literal>MANIFEST_CHECKSUMS</literal></term>
|
<term><literal>MANIFEST_CHECKSUMS</literal> <replaceable>checksum_algorithm</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Specifies the algorithm that should be applied to each file included
|
Specifies the algorithm that should be applied to each file included
|
||||||
|
@ -1211,7 +1211,7 @@ ReceiveTarFile(PGconn *conn, PGresult *res, int rownum)
|
|||||||
* we're writing a tarfile to stdout, we don't have that option, so
|
* we're writing a tarfile to stdout, we don't have that option, so
|
||||||
* include it in the one tarfile we've got.
|
* include it in the one tarfile we've got.
|
||||||
*/
|
*/
|
||||||
if (strcmp(basedir, "-") == 0)
|
if (strcmp(basedir, "-") == 0 && manifest)
|
||||||
{
|
{
|
||||||
char header[512];
|
char header[512];
|
||||||
PQExpBufferData buf;
|
PQExpBufferData buf;
|
||||||
@ -2271,7 +2271,7 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
atexit(cleanup_directories_atexit);
|
atexit(cleanup_directories_atexit);
|
||||||
|
|
||||||
while ((c = getopt_long(argc, argv, "CD:F:r:RS:T:X:l:nNzZ:d:c:h:p:U:s:wWkvPm:",
|
while ((c = getopt_long(argc, argv, "CD:F:r:RS:T:X:l:nNzZ:d:c:h:p:U:s:wWkvP",
|
||||||
long_options, &option_index)) != -1)
|
long_options, &option_index)) != -1)
|
||||||
{
|
{
|
||||||
switch (c)
|
switch (c)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user