1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

pg_basebackup: Clean created directories on failure

Like initdb, clean up created data and xlog directories, unless the new
-n/--noclean option is specified.

Tablespace directories are not cleaned up, but a message is written
about that.

Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
This commit is contained in:
Peter Eisentraut
2016-09-12 12:00:00 -04:00
parent 63c1a87194
commit 9083353b15
3 changed files with 119 additions and 7 deletions

View File

@ -398,6 +398,24 @@ PostgreSQL documentation
</listitem>
</varlistentry>
<varlistentry>
<term><option>-n</option></term>
<term><option>--noclean</option></term>
<listitem>
<para>
By default, when <command>pg_basebackup</command> aborts with an
error, it removes any directories it might have created before
discovering that it cannot finish the job (for example, data directory
and transaction log directory). This option inhibits tidying-up and is
thus useful for debugging.
</para>
<para>
Note that tablespace directories are not cleaned up either way.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-P</option></term>
<term><option>--progress</option></term>