Skip to content

Commit 21e32d8

Browse files
翻译sgml/pgsurgery.sgml
1 parent 9e1077d commit 21e32d8

File tree

1 file changed

+7
-22
lines changed

1 file changed

+7
-22
lines changed

postgresql/doc/src/sgml/pgsurgery.sgml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,21 @@
88
</indexterm>
99

1010
<para>
11-
The <filename>pg_surgery</filename> module provides various functions to
12-
perform surgery on a damaged relation. These functions are unsafe by design
13-
and using them may corrupt (or further corrupt) your database. For example,
14-
these functions can easily be used to make a table inconsistent with its
15-
own indexes, to cause <literal>UNIQUE</literal> or
16-
<literal>FOREIGN KEY</literal> constraint violations, or even to make
17-
tuples visible which, when read, will cause a database server crash.
18-
They should be used with great caution and only as a last resort.
11+
<filename>pg_surgery</filename>模块提供了各种函数来对损坏的表进行手术。 这些函数在设计上是不安全的,使用它们可能会损坏(或进一步损坏)您的数据库。 例如,这些函数可以很容易地用于使表与其自己的索引不一致,导致 <literal>UNIQUE</literal> 或 <literal>FOREIGN KEY</literal> 约束违规,甚至使元组可见,读取时,将导致数据库服务器崩溃。 应非常谨慎地使用它们,并且仅作为最后的手段。
1912
</para>
2013

2114
<sect2>
22-
<title>Functions</title>
15+
<title>函数</title>
2316

2417
<variablelist>
2518
<varlistentry>
2619
<term>
27-
<function>heap_force_kill(regclass, tid[]) returns void</function>
20+
<function>heap_force_kill(regclass, tid[]) 返回 void</function>
2821
</term>
2922

3023
<listitem>
3124
<para>
32-
<function>heap_force_kill</function> marks <quote>used</quote> line
33-
pointers as <quote>dead</quote> without examining the tuples. The
34-
intended use of this function is to forcibly remove tuples that are not
35-
otherwise accessible. For example:
25+
<function>heap_force_kill</function> 在不检查元组的情况下将 <quote>已使用</quote> 行指针标记为 <quote>死亡</quote>。 此函数的预期用途是强制删除无法以其他方式访问的元组。 例如:
3626
<programlisting>
3727
test=&gt; select * from t1 where ctid = '(0, 1)';
3828
ERROR: could not access status of transaction 4007513275
@@ -54,17 +44,12 @@ test=# select * from t1 where ctid = '(0, 1)';
5444

5545
<varlistentry>
5646
<term>
57-
<function>heap_force_freeze(regclass, tid[]) returns void</function>
47+
<function>heap_force_freeze(regclass, tid[]) 返回 void</function>
5848
</term>
5949

6050
<listitem>
6151
<para>
62-
<function>heap_force_freeze</function> marks tuples as frozen without
63-
examining the tuple data. The intended use of this function is to
64-
make accessible tuples which are inaccessible due to corrupted
65-
visibility information, or which prevent the table from being
66-
successfully vacuumed due to corrupted visibility information.
67-
For example:
52+
<function>heap_force_freeze</function>将元组标记为冻结,而不检查元组数据。此函数的预期用途是制作可访问的元组,这些元组由于损坏的可见性信息而无法访问,或者由于损坏的可见性信息而无法成功清理表。 例如:
6853
<programlisting>
6954
test=&gt; vacuum t1;
7055
ERROR: found xmin 507 from before relfrozenxid 515
@@ -97,7 +82,7 @@ test=# select ctid from t1 where xmin = 2;
9782
</sect2>
9883

9984
<sect2>
100-
<title>Authors</title>
85+
<title>作者</title>
10186

10287
<para>
10388
Ashutosh Sharma <email>ashu.coek88@gmail.com</email>

0 commit comments

Comments
 (0)