Skip to content

Commit 5856bd4

Browse files
Merge branch 'postgres-cn:master' into master
2 parents 093b564 + cd1fa04 commit 5856bd4

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

postgresql/doc/src/sgml/maintenance.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ ________________________________________________________-->
832832
________________________________________________________-->
833833
<para>
834834
<command>VACUUM</command>使用<link linkend="storage-vm">可见性映射</link>来确定必须扫描哪些表页。
835-
通常,即使这些页可能仍然具有具有旧XID值的行版本,也会跳过没有任何死行版本的页。
835+
通常,即使这些页可能仍然具有旧XID值的行版本,也会跳过没有任何死行版本的页。
836836
因此,通常的<command>VACUUM</command>不会总是冻结表中的每个旧行版本。
837837
当发生这种情况时,<command>VACUUM</command>最终需要执行<firstterm>积极的清理</firstterm>,
838838
这将冻结所有符合条件的未冻结XID和MXID值,包括所有可见但未全部冻结的页。
@@ -1562,7 +1562,7 @@ ________________________________________________________-->
15621562
废弃元组的数量和插入元组的数量是从累积统计系统中获取的;
15631563
这是一个由每个<command>UPDATE</command>、<command>DELETE</command>和<command>INSERT</command>操作更新的半准确计数。
15641564
(它只是半准确的,因为在重载下可能会丢失一些信息。)
1565-
如果表的<structfield>relfrozenxid</structfield>值超过<varname>vacuum_freeze_table_age</varname>个事务旧
1565+
如果表的<structfield>relfrozenxid</structfield>值比<varname>vacuum_freeze_table_age</varname>个事务更旧
15661566
则执行积极的清理以冻结旧元组并推进
15671567
<structfield>relfrozenxid</structfield>;否则,只扫描自上次清理以来已修改的页面。
15681568
</para>
@@ -1852,7 +1852,7 @@ ________________________________________________________-->
18521852
________________________________________________________-->
18531853
<para>
18541854
日志输出往往是庞大的(特别是在更高的调试级别),因此您不希望无限期保存它。
1855-
您需要<emphasis>轮换</emphasis>日志文件,以便在合理的时间后启动新的日志文件并删除旧的日志文件。
1855+
您需要<emphasis>轮换(rotate)</emphasis>日志文件,以便在合理的时间后启动新的日志文件并删除旧的日志文件。
18561856
</para>
18571857
<!-- pgdoc-cn_end sig_en=e52c83a2a7ca3f9b803e1a96d727da8e -->
18581858

postgresql/doc/src/sgml/monitoring.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6681,7 +6681,7 @@ ________________________________________________________-->
66816681
<structfield>skip_fpw</structfield> <type>bigint</type>
66826682
</para>
66836683
<para>
6684-
由于WAL中包含完整页图像,未预取的块数
6684+
由于WAL中包含完整页图像而未预取的块数
66856685
</para>
66866686
</entry>
66876687
</row>
@@ -6705,7 +6705,7 @@ ________________________________________________________-->
67056705
<structfield>skip_rep</structfield> <type>bigint</type>
67066706
</para>
67076707
<para>
6708-
已经最近预取的块数目
6708+
由于最近已经预取过而未预取的块数
67096709
</para>
67106710
</entry>
67116711
</row>
@@ -8546,7 +8546,7 @@ ________________________________________________________-->
85468546
________________________________________________________-->
85478547
<row>
85488548
<entry role="catalog_table_entry"><para role="column_definition">
8549-
<structfield>返回的元组</structfield> <type>bigint</type>
8549+
<structfield>tup_returned</structfield> <type>bigint</type>
85508550
</para>
85518551
<para>
85528552
由顺序扫描获取的活动行数和由索引扫描返回的索引条目数

postgresql/doc/src/sgml/plpython.sgml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ ________________________________________________________-->
117117

118118
<programlisting>
119119
CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-list</replaceable>)
120-
返回 <replaceable>return-type</replaceable>
120+
RETURNS <replaceable>return-type</replaceable>
121121
AS $$
122-
# PL/Python函数体
122+
# PL/Python function body
123123
$$ LANGUAGE plpython3u;
124124
</programlisting>
125125
</para>
@@ -929,7 +929,7 @@ AS $$
929929
self.value = v
930930
return named_value(name, value)
931931

932-
# 或者简单地
932+
# or simply
933933
class nv: pass
934934
nv.name = name
935935
nv.value = value
@@ -1104,8 +1104,8 @@ CREATE TYPE greeting AS (
11041104
CREATE FUNCTION greet (how text)
11051105
RETURNS SETOF greeting
11061106
AS $$
1107-
# 返回包含列表的元组作为复合类型
1108-
# 所有其他组合也可以工作
1107+
# return tuple containing lists as composite types
1108+
# all other combinations work also
11091109
return ( [ how, "World" ], [ how, "PostgreSQL" ], [ how, "PL/Python" ] )
11101110
$$ LANGUAGE plpython3u;
11111111
</programlisting>
@@ -1257,7 +1257,7 @@ ________________________________________________________-->
12571257

12581258
<programlisting>
12591259
DO $$
1260-
# PL/Python 代码
1260+
# PL/Python code
12611261
$$ LANGUAGE plpython3u;
12621262
</programlisting>
12631263

@@ -2078,13 +2078,13 @@ try:
20782078
plan = plpy.prepare("INSERT INTO fractions (frac) VALUES ($1 / $2)", ["int", "int"])
20792079
plpy.execute(plan, [numerator, denominator])
20802080
except spiexceptions.DivisionByZero:
2081-
return "分母不能为零"
2081+
return "denominator cannot equal zero"
20822082
except spiexceptions.UniqueViolation:
2083-
return "已经有该分数"
2083+
return "already have that fraction"
20842084
except plpy.SPIError as e:
2085-
return "其他错误,SQLSTATE %s" % e.sqlstate
2085+
return "other error, SQLSTATE %s" % e.sqlstate
20862086
else:
2087-
return "插入分数"
2087+
return "fraction inserted"
20882088
$$ LANGUAGE plpython3u;
20892089
</programlisting>
20902090
请注意,由于<literal>plpy.spiexceptions</literal>模块中的所有异常都继承自<literal>SPIError</literal>,

0 commit comments

Comments
 (0)