|
8 | 8 | </indexterm>
|
9 | 9 |
|
10 | 10 | <para>
|
11 |
| - <application>pg_archivecleanup</> is designed to cleanup an archive when used |
12 |
| - as an <literal>archive_cleanup_command</literal> when running with |
13 |
| - <literal>standby_mode = on</literal>. <application>pg_archivecleanup</> can |
14 |
| - also be used as a standalone program to clean WAL file archives. |
| 11 | + <application>pg_archivecleanup</> is designed to be used as an |
| 12 | + <literal>archive_cleanup_command</literal> to clean up WAL file archives when |
| 13 | + running as a standby server (see <xref linkend="warm-standby">). |
| 14 | + <application>pg_archivecleanup</> can also be used as a standalone program to |
| 15 | + clean WAL file archives. |
15 | 16 | </para>
|
16 | 17 |
|
17 | 18 | <para>
|
|
39 | 40 | server to use <application>pg_archivecleanup</>, put this into its
|
40 | 41 | <filename>recovery.conf</filename> configuration file:
|
41 | 42 | <programlisting>
|
42 |
| -archive_cleanup_command = 'pg_archivecleanup <replaceable>archiveDir</> %r' |
| 43 | +archive_cleanup_command = 'pg_archivecleanup <replaceable>archivelocation</> %r' |
43 | 44 | </programlisting>
|
44 |
| - where <replaceable>archiveDir</> is the directory from which WAL segment |
45 |
| - files should be restored. |
| 45 | + where <replaceable>archivelocation</> is the directory from which WAL segment |
| 46 | + files should be removed. |
46 | 47 | </para>
|
47 | 48 | <para>
|
48 |
| - When used within <literal>archive_cleanup_command</literal>, |
49 |
| - all WAL files logically preceding the value of the <literal>%r</> |
50 |
| - will be removed <replaceable>archivelocation</>. This minimizes |
51 |
| - the number of files that need to be retained, while preserving |
52 |
| - crash-restart capability. Use of this parameter is appropriate if the |
53 |
| - <replaceable>archivelocation</> is a transient staging area for this |
54 |
| - particular standby server, but <emphasis>not</> when the |
55 |
| - <replaceable>archivelocation</> is intended as a long-term WAL archive area. |
| 49 | + When used within <xref linkend="archive-cleanup-command">, all WAL files |
| 50 | + logically preceding the value of the <literal>%r</> argument will be removed |
| 51 | + from <replaceable>archivelocation</>. This minimizes the number of files |
| 52 | + that need to be retained, while preserving crash-restart capability. Use of |
| 53 | + this parameter is appropriate if the <replaceable>archivelocation</> is a |
| 54 | + transient staging area for this particular standby server, but |
| 55 | + <emphasis>not</> when the <replaceable>archivelocation</> is intended as a |
| 56 | + long-term WAL archive area, or when multiple standby servers are recovering |
| 57 | + from the same archive location. |
56 | 58 | </para>
|
57 | 59 | <para>
|
58 | 60 | The full syntax of <application>pg_archivecleanup</>'s command line is
|
|
0 commit comments