Skip to content

Commit 85fca85

Browse files
committed
最后9个sgml的翻译提交(翻译By翰高-韩悦悦)
1 parent c46aa26 commit 85fca85

File tree

9 files changed

+4940
-838
lines changed

9 files changed

+4940
-838
lines changed

postgresql/doc/src/sgml/pgarchivecleanup.sgml

Lines changed: 159 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@
44
<refmeta>
55
<refentrytitle><application>pg_archivecleanup</application></refentrytitle>
66
<manvolnum>1</manvolnum>
7+
<!--
78
<refmiscinfo>Application</refmiscinfo>
9+
-->
10+
<refmiscinfo>应用</refmiscinfo>
811
</refmeta>
912

1013
<refnamediv>
1114
<refname>pg_archivecleanup</refname>
15+
<!--
1216
<refpurpose>clean up <productname>PostgreSQL</productname> WAL archive files</refpurpose>
17+
-->
18+
<refpurpose>清理<productname>PostgreSQL</productname> WAL归档文件</refpurpose>
1319
</refnamediv>
1420

1521
<indexterm zone="pgarchivecleanup">
@@ -26,17 +32,29 @@
2632
</refsynopsisdiv>
2733

2834
<refsect1>
29-
<title>Description</title>
35+
<!--
36+
<title>Description</title>
37+
-->
38+
<title>描述</title>
3039

31-
<para>
40+
41+
<!--
42+
<para>
3243
<application>pg_archivecleanup</> is designed to be used as an
3344
<literal>archive_cleanup_command</literal> to clean up WAL file archives when
3445
running as a standby server (see <xref linkend="warm-standby">).
3546
<application>pg_archivecleanup</> can also be used as a standalone program to
3647
clean WAL file archives.
3748
</para>
49+
-->
50+
<para>
51+
<application>pg_archivecleanup</>被设计来用作<literal>archive_cleanup_command</literal>,
52+
在作为备用服务器运行时清理WAL文件归档(参阅<xref linkend="warm-standby">)。
53+
<application>pg_archivecleanup</>也可以用作一个单独的程序清理WAL文件归档。
54+
</para>
3855

39-
<para>
56+
<!--
57+
<para>
4058
To configure a standby
4159
server to use <application>pg_archivecleanup</>, put this into its
4260
<filename>recovery.conf</filename> configuration file:
@@ -46,7 +64,17 @@ archive_cleanup_command = 'pg_archivecleanup <replaceable>archivelocation</> %r'
4664
where <replaceable>archivelocation</> is the directory from which WAL segment
4765
files should be removed.
4866
</para>
49-
<para>
67+
-->
68+
<para>
69+
要配置备用服务器使用<application>pg_archivecleanup</>,将下列代码放入
70+
<filename>recovery.conf</filename>配置文件中:
71+
<programlisting>
72+
archive_cleanup_command = 'pg_archivecleanup <replaceable>archivelocation</> %r'
73+
</programlisting>
74+
这里的<replaceable>archivelocation</>是应该被移除的WAL段文件的目录。
75+
</para>
76+
<!--
77+
<para>
5078
When used within <xref linkend="archive-cleanup-command">, all WAL files
5179
logically preceding the value of the <literal>%r</> argument will be removed
5280
from <replaceable>archivelocation</>. This minimizes the number of files
@@ -57,14 +85,33 @@ archive_cleanup_command = 'pg_archivecleanup <replaceable>archivelocation</> %r'
5785
long-term WAL archive area, or when multiple standby servers are recovering
5886
from the same archive location.
5987
</para>
60-
<para>
88+
-->
89+
<para>
90+
当在<xref linkend="archive-cleanup-command">中使用时,所有逻辑上在<literal>%r</>
91+
参数值之前的WAL文件都将从<replaceable>archivelocation</>中移除。
92+
这在保存崩溃-重启能力时,最小化了需要保留的文件数量。
93+
如果<replaceable>archivelocation</>是这个特殊的备用服务器的瞬态暂存区域,
94+
那么使用这个参数是合适的,但是在<replaceable>archivelocation</>
95+
用作长期WAL归档区,或者多个备用服务器是从同一个归档位置恢复而来的时,
96+
是<emphasis>不</>合适的。
97+
</para>
98+
99+
<para>
100+
<!--
61101
When used as a standalone program all WAL files logically preceding the
62102
<replaceable>oldestkeptwalfile</> will be removed from <replaceable>archivelocation</>.
63103
In this mode, if you specify a <filename>.backup</> file name, then only the file prefix
64104
will be used as the <replaceable>oldestkeptwalfile</>. This allows you to remove
65105
all WAL files archived prior to a specific base backup without error.
66106
For example, the following example will remove all files older than
67107
WAL file name <filename>000000010000003700000010</>:
108+
-->
109+
当用作独立程序时,所有逻辑上在<replaceable>oldestkeptwalfile</>
110+
之前的WAL文件都将从<replaceable>archivelocation</>中移除。
111+
在这个模式中,如果你声明一个<filename>.backup</>文件名,
112+
那么只有文件前缀将被用作<replaceable>oldestkeptwalfile</>。
113+
这允许你无误的删除所有在一个特定基础备份之前归档的WAL文件。
114+
例如,下面的例子将删除所有比WAL文件名<filename>000000010000003700000010</>更老的文件:
68115
<programlisting>
69116
pg_archivecleanup -d archive 000000010000003700000010.00000020.backup
70117

@@ -73,104 +120,169 @@ pg_archivecleanup: removing file "archive/00000001000000370000000F"
73120
pg_archivecleanup: removing file "archive/00000001000000370000000E"
74121
</programlisting>
75122
</para>
76-
<para>
123+
124+
<!--
125+
<para>
77126
<application>pg_archivecleanup</application> assumes that
78127
<replaceable>archivelocation</> is a directory readable and writable by the
79128
server-owning user.
80129
</para>
130+
-->
131+
<para>
132+
<application>pg_archivecleanup</application>假设<replaceable>archivelocation</>
133+
是一个服务器所有者用户可读和可写的目录。
134+
</para>
81135
</refsect1>
82136

83137
<refsect1>
138+
<!--
84139
<title>Options</title>
140+
-->
141+
<title>选项</title>
85142

86-
<para>
143+
144+
<para>
145+
<!--
87146
<application>pg_archivecleanup</application> accepts the following command-line arguments:
88-
147+
-->
148+
<application>pg_archivecleanup</application>接受下列命令行参数:
89149
<variablelist>
90150

91151
<varlistentry>
92152
<term><option>-d</option></term>
93153
<listitem>
154+
<!--
94155
<para>
95156
Print lots of debug logging output on <filename>stderr</>.
96157
</para>
158+
-->
159+
<para>
160+
在<filename>stderr</>上打印大量的调试日志输出。
161+
</para>
97162
</listitem>
98163
</varlistentry>
99164

100165
<varlistentry>
101166
<term><option>-n</option></term>
102167
<listitem>
103-
<para>
168+
<!--
169+
<para>
104170
Print the names of the files that would have been removed on <filename>stdout</> (performs a dry run).
105171
</para>
172+
-->
173+
<para>
174+
打印将要在<filename>stdout</>上删除的文件名(执行一个空运行)。
175+
</para>
106176
</listitem>
107177
</varlistentry>
108178

109179
<varlistentry>
110180
<term><option>-V</></term>
111181
<term><option>--version</></term>
112182
<listitem>
113-
<para>
183+
<!--
184+
<para>
114185
Print the <application>pg_archivecleanup</application> version and exit.
115186
</para>
187+
-->
188+
<para>
189+
打印<application>pg_archivecleanup</application>的版本并退出。
190+
</para>
116191
</listitem>
117192
</varlistentry>
118193

119194
<varlistentry>
120195
<term><option>-x</option> <replaceable>extension</></term>
121196
<listitem>
122-
<para>
197+
<!--
198+
<para>
123199
When using the program as a standalone utility, provide an extension
124200
that will be stripped from all file names before deciding if they
125201
should be deleted. This is typically useful for cleaning up archives
126202
that have been compressed during storage, and therefore have had an
127203
extension added by the compression program. For example: <literal>-x
128204
.gz</literal>.
129205
</para>
206+
-->
207+
<para>
208+
当该程序用作单独的工具时,提供一个扩展,该扩展将在决定文件是否应该被删除之前,
209+
提取所有的文件名。这通常在清理在存储时已经压缩了的归档时是有用的,
210+
并且因此有一个由压缩程序添加的扩展。例如:<literal>-x.gz</literal>。
211+
</para>
130212

131-
<para>
213+
<!--
214+
<para>
132215
Note that the
133216
<filename>.backup</> file name passed to the program should not
134217
include the extension.
135218
</para>
219+
-->
220+
<para>
221+
请注意,传递到该程序的<filename>.backup</>文件名不应该包含该扩展。
222+
</para>
136223
</listitem>
137224
</varlistentry>
138225

139226
<varlistentry>
140227
<term><option>-?</></term>
141228
<term><option>--help</></term>
142229
<listitem>
143-
<para>
230+
<!--
231+
<para>
144232
Show help about <application>pg_archivecleanup</application> command line
145233
arguments, and exit.
146234
</para>
235+
-->
236+
<para>
237+
显示关于<application>pg_archivecleanup</application>命令行参数的帮助信息,然后退出。
238+
</para>
147239
</listitem>
148240
</varlistentry>
149241
</variablelist>
150242
</para>
151243
</refsect1>
152244

153245
<refsect1>
154-
<title>Notes</title>
246+
<!--
247+
<title>Notes</title>
248+
-->
249+
<title>注意</title>
155250

156-
<para>
251+
<!--
252+
<para>
157253
<application>pg_archivecleanup</application> is designed to work with
158254
<productname>PostgreSQL</> 8.0 and later when used as a standalone utility,
159255
or with <productname>PostgreSQL</> 9.0 and later when used as an
160256
archive cleanup command.
161257
</para>
258+
-->
259+
<para>
260+
当用作单独的工具时,<application>pg_archivecleanup</application>
261+
是设计在<productname>PostgreSQL</> 8.0及更新的版本上使用的,
262+
或者用作归档清理命令时,用在<productname>PostgreSQL</> 9.0及更新的版本上。
263+
</para>
162264

163-
<para>
265+
<!--
266+
<para>
164267
<application>pg_archivecleanup</application> is written in C and has an
165268
easy-to-modify source code, with specifically designated sections to modify
166269
for your own needs
167270
</para>
271+
-->
272+
<para>
273+
<application>pg_archivecleanup</application>是用C写的,有一个容易修改的源代码,
274+
有专门指定的部分用来修改以满足你自己的需要。
275+
</para>
168276
</refsect1>
169277

170278
<refsect1>
171-
<title>Examples</title>
279+
<!--
280+
<title>Examples</title>
281+
-->
282+
<title>例子</title>
172283

173-
<para>On Linux or Unix systems, you might use:
284+
<!--
285+
<para>On Linux or Unix systems, you might use:
174286
<programlisting>
175287
archive_cleanup_command = 'pg_archivecleanup -d /mnt/standby/archive %r 2>>cleanup.log'
176288
</programlisting>
@@ -179,30 +291,55 @@ archive_cleanup_command = 'pg_archivecleanup -d /mnt/standby/archive %r 2>>clean
179291
but the files are local to the standby.
180292
This will:
181293
</para>
294+
-->
295+
<para>
296+
在Linux或Unix系统上,你可能使用:
297+
<programlisting>
298+
archive_cleanup_command = 'pg_archivecleanup -d /mnt/standby/archive %r 2>>cleanup.log'
299+
</programlisting>
300+
这里的归档目录的物理位置在备用服务器上,所以<varname>archive_command</>
301+
是通过NFS访问它的,但是文件对于备用服务器是本地的。这将:
302+
</para>
182303
<itemizedlist>
183304
<listitem>
184-
<para>
305+
<!--
306+
<para>
185307
produce debugging output in <filename>cleanup.log</>
186308
</para>
309+
-->
310+
<para>
311+
在<filename>cleanup.log</>中产生调试输出
312+
</para>
187313
</listitem>
188314
<listitem>
189-
<para>
315+
<!--
316+
<para>
190317
remove no-longer-needed files from the archive directory
191318
</para>
319+
-->
320+
<para>
321+
从归档目录中移除不再需要的文件
322+
</para>
192323
</listitem>
193324
</itemizedlist>
194325
</refsect1>
195326

196327
<refsect1>
328+
<!--
197329
<title>Author</title>
330+
-->
331+
<title>作者</title>
198332

199-
<para>
333+
<para>
200334
Simon Riggs <email>simon@2ndquadrant.com</email>
201335
</para>
202336
</refsect1>
203337

204338
<refsect1>
205-
<title>See Also</title>
339+
<!--
340+
<title>See Also</title>
341+
-->
342+
<title>又见</title>
206343

207344
<simplelist type="inline">
208345
<member><xref linkend="pgstandby"></member>

0 commit comments

Comments
 (0)