8
8
</indexterm>
9
9
10
10
<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> 约束违规,甚至使元组可见,读取时,将导致数据库服务器崩溃。 应非常谨慎地使用它们,并且仅作为最后的手段。
19
12
</para>
20
13
21
14
<sect2>
22
- <title>Functions </title>
15
+ <title>函数 </title>
23
16
24
17
<variablelist>
25
18
<varlistentry>
26
19
<term>
27
- <function>heap_force_kill(regclass, tid[]) returns void</function>
20
+ <function>heap_force_kill(regclass, tid[]) 返回 void</function>
28
21
</term>
29
22
30
23
<listitem>
31
24
<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>。 此函数的预期用途是强制删除无法以其他方式访问的元组。 例如:
36
26
<programlisting>
37
27
test=> select * from t1 where ctid = '(0, 1)';
38
28
ERROR: could not access status of transaction 4007513275
@@ -54,17 +44,12 @@ test=# select * from t1 where ctid = '(0, 1)';
54
44
55
45
<varlistentry>
56
46
<term>
57
- <function>heap_force_freeze(regclass, tid[]) returns void</function>
47
+ <function>heap_force_freeze(regclass, tid[]) 返回 void</function>
58
48
</term>
59
49
60
50
<listitem>
61
51
<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>将元组标记为冻结,而不检查元组数据。此函数的预期用途是制作可访问的元组,这些元组由于损坏的可见性信息而无法访问,或者由于损坏的可见性信息而无法成功清理表。 例如:
68
53
<programlisting>
69
54
test=> vacuum t1;
70
55
ERROR: found xmin 507 from before relfrozenxid 515
@@ -97,7 +82,7 @@ test=# select ctid from t1 where xmin = 2;
97
82
</sect2>
98
83
99
84
<sect2>
100
- <title>Authors </title>
85
+ <title>作者 </title>
101
86
102
87
<para>
103
88
Ashutosh Sharma <email>ashu.coek88@gmail.com</email>
0 commit comments