-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathamcheck.html
More file actions
405 lines (404 loc) · 35.1 KB
/
Copy pathamcheck.html
File metadata and controls
405 lines (404 loc) · 35.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>F.2. amcheck</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="prev" href="adminpack.html" title="F.1. adminpack" /><link rel="next" href="auth-delay.html" title="F.3. auth_delay" /><meta name="viewport" content="width=device-width,initial-scale=1.0" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="4" align="center"><a accesskey="h" href="index.html">PostgreSQL 12.4文書</a></th></tr><tr><td width="10%" align="left"></td><td width="10%" align="left"></td><td width="60%" align="center"><a href="contrib.html" title="付録F 追加で提供されるモジュール">付録F 追加で提供されるモジュール</a></td><td width="20%" align="right"><div class="actions"><a class="issue" title="github" href="https://github.com/pgsql-jp/jpug-doc/issues/new?title=version 12.4 amcheck.html">誤訳等の報告
</a></div></td></tr><tr><td width="10%" align="left"><a accesskey="p" href="adminpack.html" title="F.1. adminpack">前へ</a> </td><td width="10%" align="left"><a accesskey="u" href="contrib.html" title="付録F 追加で提供されるモジュール">上へ</a></td><td width="60%" align="center">F.2. amcheck</td><td width="20%" align="right"> <a accesskey="n" href="auth-delay.html" title="F.3. auth_delay">次へ</a></td></tr></table><hr /></div><div class="sect1" id="AMCHECK"><div class="titlepage"><div><div><h2 class="title" style="clear: both">F.2. amcheck</h2></div></div></div><a id="id-1.11.7.11.2" class="indexterm"></a><p>
<span class="original">
The <filename>amcheck</filename> module provides functions that allow you to
verify the logical consistency of the structure of relations. If the
structure appears to be valid, no error is raised.
</span>
<code class="filename">amcheck</code>モジュールは、リレーションの構造の論理的な一貫性を検査する機能を提供します。
構造が適正であると見なされれば、エラーは報告されません。
</p><p>
<span class="original">
The functions verify various <emphasis>invariants</emphasis> in the
structure of the representation of particular relations. The
correctness of the access method functions behind index scans and
other important operations relies on these invariants always
holding. For example, certain functions verify, among other things,
that all B-Tree pages have items in <quote>logical</quote> order (e.g.,
for B-Tree indexes on <type>text</type>, index tuples should be in
collated lexical order). If that particular invariant somehow fails
to hold, we can expect binary searches on the affected page to
incorrectly guide index scans, resulting in wrong answers to SQL
queries.
</span>
この関数は、特定のリレーションの構造表現における様々な<span class="emphasis"><em>不変量</em></span>を検査します。
インデックスの走査や、その他の重要な操作を担うアクセスメソッド関数の正しさは、これらの不変量を常に保つことに依存しています。
たとえば、ある関数は、とりわけすべてのB-Treeページの中の項目が<span class="quote">「<span class="quote">論理的な</span>」</span>順序になっていることを検査します。(たとえば<code class="type">text</code>のB-Treeインデックスでは、インデックスタプルは語句の照合順になっていなければなりません。)
その特定の不変量が何らかの理由で保たれなければ、該当するページで二分探索が不正なインデックス走査をもたらし、SQL問い合わせに誤った答えを返すことになるでしょう。
</p><p>
<span class="original">
Verification is performed using the same procedures as those used by
index scans themselves, which may be user-defined operator class
code. For example, B-Tree index verification relies on comparisons
made with one or more B-Tree support function 1 routines. See <xref
linkend="xindex-support"/> for details of operator class support
functions.
</span>
検証は、インデックス走査自身で使われるのと同じ手続きを用いて行われます。
その手続きは、ユーザ定義演算子クラスのコードかもしれません。
たとえば、B-Treeインデックスの検査は、一つ以上のB-Treeサポート関数1ルーチンを用いる比較に依存しています。
演算子クラスサポート関数の詳細については<a class="xref" href="xindex.html#XINDEX-SUPPORT" title="37.16.3. インデックスメソッドのサポートルーチン">37.16.3</a>をご覧ください。
</p><p>
<span class="original">
<filename>amcheck</filename> functions may only be used by superusers.
</span>
<code class="filename">amcheck</code>関数はスーパーユーザだけが使用できます。
</p><div class="sect2" id="id-1.11.7.11.7"><div class="titlepage"><div><div><h3 class="title">F.2.1. 関数</h3></div></div></div><span class="original">
<title>Functions</title>
</span><div class="variablelist"><dl class="variablelist"><dt><span class="term">
<code class="function">bt_index_check(index regclass, heapallindexed boolean) returns void</code>
<a id="id-1.11.7.11.7.2.1.1.2" class="indexterm"></a>
</span></dt><dd><p>
<span class="original">
<function>bt_index_check</function> tests that its target, a
B-Tree index, respects a variety of invariants. Example usage:
</span>
<code class="function">bt_index_check</code>は対象となるB-Treeインデックスが、様々な不変量を維持していることをテストします。
例を示します。
</p><pre class="screen">
test=# SELECT bt_index_check(index => c.oid, heapallindexed => i.indisunique),
c.relname,
c.relpages
FROM pg_index i
JOIN pg_opclass op ON i.indclass[0] = op.oid
JOIN pg_am am ON op.opcmethod = am.oid
JOIN pg_class c ON i.indexrelid = c.oid
JOIN pg_namespace n ON c.relnamespace = n.oid
WHERE am.amname = 'btree' AND n.nspname = 'pg_catalog'
-- Don't check temp tables, which may be from another session:
AND c.relpersistence != 't'
-- Function may throw an error when this is omitted:
AND c.relkind = 'i' AND i.indisready AND i.indisvalid
ORDER BY c.relpages DESC LIMIT 10;
bt_index_check | relname | relpages
----------------+---------------------------------+----------
| pg_depend_reference_index | 43
| pg_depend_depender_index | 40
| pg_proc_proname_args_nsp_index | 31
| pg_description_o_c_o_index | 21
| pg_attribute_relid_attnam_index | 14
| pg_proc_oid_index | 10
| pg_attribute_relid_attnum_index | 9
| pg_amproc_fam_proc_index | 5
| pg_amop_opr_fam_index | 5
| pg_amop_fam_strat_index | 5
(10 rows)
</pre><p>
<span class="original">
This example shows a session that performs verification of the
10 largest catalog indexes in the database <quote>test</quote>.
Verification of the presence of heap tuples as index tuples is
requested for the subset that are unique indexes. Since no
error is raised, all indexes tested appear to be logically
consistent. Naturally, this query could easily be changed to
call <function>bt_index_check</function> for every index in the
database where verification is supported.
</span>
この例では、データベース<span class="quote">「<span class="quote">test</span>」</span>中のもっとも大きな10個のカタログインデックスの検証を行うセッションを示しています。
インデックスタプルに対応するヒープタプルの存在の検証が、ユニークインデックスであるインデックスの一部に対して要求されています。
エラーは出ていないので、テストしたすべてのインデックスは論理的に一貫していることがわかります。
当然のことながら、この問い合わせは、検証可能なデータベース中のすべてのインデックスに対して<code class="function">bt_index_check</code>を呼び出すように変更できます。
</p><p>
<span class="original">
<function>bt_index_check</function> acquires an <literal>AccessShareLock</literal>
on the target index and the heap relation it belongs to. This lock mode
is the same lock mode acquired on relations by simple
<literal>SELECT</literal> statements.
<function>bt_index_check</function> does not verify invariants
that span child/parent relationships, but will verify the
presence of all heap tuples as index tuples within the index
when <parameter>heapallindexed</parameter> is
<literal>true</literal>. When a routine, lightweight test for
corruption is required in a live production environment, using
<function>bt_index_check</function> often provides the best
trade-off between thoroughness of verification and limiting the
impact on application performance and availability.
</span>
<code class="function">bt_index_check</code>は、ターゲットとなるインデックスと、それが所属するヒープリレーションに対して<code class="literal">AccessShareLock</code>を獲得します。
このロックモードは、単純な<code class="literal">SELECT</code>文がリレーションに対して獲得するのと同じものです。
<code class="function">bt_index_check</code>は、子/親関係に渡る不変量を検査しませんが、<em class="parameter"><code>heapallindexed</code></em>が<code class="literal">true</code>の場合には、インデックス中のインデックスタプルに対応するすべてのヒープタプルの存在が検証されます、
実行中のプロダクション環境で定期的、軽量なデータ破損検査が必要な場合、<code class="function">bt_index_check</code>を使うのが、検査の完全性と、アプリケーションの性能と稼働への影響を限定することとの間の最良のトレードオフになることがしばしばあります。
</p></dd><dt><span class="term">
<code class="function">bt_index_parent_check(index regclass, heapallindexed boolean, rootdescend boolean) returns void</code>
<a id="id-1.11.7.11.7.2.2.1.2" class="indexterm"></a>
</span></dt><dd><p>
<span class="original">
<function>bt_index_parent_check</function> tests that its
target, a B-Tree index, respects a variety of invariants.
Optionally, when the <parameter>heapallindexed</parameter>
argument is <literal>true</literal>, the function verifies the
presence of all heap tuples that should be found within the
index, and that there are no missing downlinks in the index
structure. When the optional <parameter>rootdescend</parameter>
argument is <literal>true</literal>, verification re-finds
tuples on the leaf level by performing a new search from the
root page for each tuple. The checks that can be performed by
<function>bt_index_parent_check</function> are a superset of the
checks that can be performed by <function>bt_index_check</function>.
<function>bt_index_parent_check</function> can be thought of as
a more thorough variant of <function>bt_index_check</function>:
unlike <function>bt_index_check</function>,
<function>bt_index_parent_check</function> also checks
invariants that span parent/child relationships.
<function>bt_index_parent_check</function> follows the general
convention of raising an error if it finds a logical
inconsistency or other problem.
</span>
<code class="function">bt_index_parent_check</code>は、ターゲットとなるB-Treeインデックスが様々な不変量を保っていることを検査します。
オプションとして、<em class="parameter"><code>heapallindexed</code></em>引数が<code class="literal">true</code>の場合、インデックスに対応して存在すべきすべてのヒープタプルの存在と、インデックス構造中のダウンリンクに漏れがないことを検証します。
省略可能な引数<em class="parameter"><code>rootdescend</code></em>が<code class="literal">true</code>であれば、各タプルに対するルートページから新しく探索することで、検証はリーフレベルのタプルを再び見つけます。
<code class="function">bt_index_parent_check</code>により実施される検査は、<code class="function">bt_index_check</code>により実施される検査のスーパーセットになっています。
<code class="function">bt_index_parent_check</code>は、<code class="function">bt_index_check</code>の更なる完璧版であると考えることができます。
つまり、<code class="function">bt_index_check</code>と違って<code class="function">bt_index_parent_check</code>は、子/親関係に渡る不変量も検査します。
<code class="function">bt_index_parent_check</code>は、論理的な非一貫性やその他の問題を発見した場合、一般的な習慣に従ってエラーを報告します。
</p><p>
<span class="original">
A <literal>ShareLock</literal> is required on the target index by
<function>bt_index_parent_check</function> (a
<literal>ShareLock</literal> is also acquired on the heap relation).
These locks prevent concurrent data modification from
<command>INSERT</command>, <command>UPDATE</command>, and <command>DELETE</command>
commands. The locks also prevent the underlying relation from
being concurrently processed by <command>VACUUM</command>, as well as
all other utility commands. Note that the function holds locks
only while running, not for the entire transaction.
</span>
<code class="function">bt_index_parent_check</code>は、ターゲットインデックスに<code class="literal">ShareLock</code>を獲得することを必要とします。
(<code class="literal">ShareLock</code>はヒープリレーションにも獲得されます。)
このロックは、<code class="command">INSERT</code>、<code class="command">UPDATE</code>、<code class="command">DELETE</code>が並行してデータ更新することを防ぎます。
また、このロックは<code class="command">VACUUM</code>その他のユーティリティコマンドによって、背後にあるリレーションが同時に処理されることを防ぎます。
この関数は実行中のみロックを保持し、トランザクション全体に保持するのではないことに注意してください。
</p><p>
<span class="original">
<function>bt_index_parent_check</function>'s additional
verification is more likely to detect various pathological
cases. These cases may involve an incorrectly implemented
B-Tree operator class used by the index that is checked, or,
hypothetically, undiscovered bugs in the underlying B-Tree index
access method code. Note that
<function>bt_index_parent_check</function> cannot be used when
Hot Standby mode is enabled (i.e., on read-only physical
replicas), unlike <function>bt_index_check</function>.
</span>
<code class="function">bt_index_parent_check</code>による追加の検査では、様々な病的な事象を検出する可能性があります。
これらの現象は、チェック対象のインデックスが使用している間違った実装がされたB-Tree演算子クラスによるものや、もしかしたら関連するB-Treeインデックスアクセスメソッドのコード中のまだ見つかっていないバグによるものなのかもしれません。
<code class="function">bt_index_check</code>と違って、<code class="function">bt_index_parent_check</code>は、ホットスタンバイモードが有効な場合(すなわち、読み出し専用物理レプリカ)では使用できません。
</p></dd></dl></div></div><div class="sect2" id="id-1.11.7.11.8"><div class="titlepage"><div><div><h3 class="title">F.2.2. オプション<em class="parameter"><code>heapallindexed</code></em>検証</h3></div></div></div><span class="original">
<title>Optional <parameter>heapallindexed</parameter> Verification</title>
</span><p>
<span class="original">
When the <parameter>heapallindexed</parameter> argument to
verification functions is <literal>true</literal>, an additional
phase of verification is performed against the table associated with
the target index relation. This consists of a <quote>dummy</quote>
<command>CREATE INDEX</command> operation, which checks for the
presence of all hypothetical new index tuples against a temporary,
in-memory summarizing structure (this is built when needed during
the basic first phase of verification). The summarizing structure
<quote>fingerprints</quote> every tuple found within the target
index. The high level principle behind
<parameter>heapallindexed</parameter> verification is that a new
index that is equivalent to the existing, target index must only
have entries that can be found in the existing structure.
</span>
検証関数の<em class="parameter"><code>heapallindexed</code></em>引数が<code class="literal">true</code>ならば、ターゲットのインデックスリレーションと関連付けられたテーブルに対して追加の検証フェーズが実施されます。
これは<span class="quote">「<span class="quote">ダミー</span>」</span>の<code class="command">CREATE INDEX</code>操作から構成され、インメモリ上の一時的なサマリー構造(これは必要に応じて基礎的な最初の検証フェーズで構築されます)に対する仮想的な新しいインデックスタプルがすべて存在することをチェックします。
サマリー構造はターゲットのインデックスで見つかったすべてのタプルに対して<span class="quote">「<span class="quote">指紋採取(fingerprint)</span>」</span>を行います。
<em class="parameter"><code>heapallindexed</code></em>検証の背後にある高レベルの原理は、新しいインデックスが既存のインデックスと等しいこと、ターゲットインデックスが既存の構造中に見つかったエントリーのみを含むことです。
</p><p>
<span class="original">
The additional <parameter>heapallindexed</parameter> phase adds
significant overhead: verification will typically take several times
longer. However, there is no change to the relation-level locks
acquired when <parameter>heapallindexed</parameter> verification is
performed.
</span>
追加の<em class="parameter"><code>heapallindexed</code></em>フェーズは大きなオーバーヘッドをもたらします。
典型的には、検証に数倍時間かかるようになります。
しかし、取得されたリレーションレベルのロックに対して、<em class="parameter"><code>heapallindexed</code></em>検証が実施されるときに変更はありません。
</p><p>
<span class="original">
The summarizing structure is bound in size by
<varname>maintenance_work_mem</varname>. In order to ensure that
there is no more than a 2% probability of failure to detect an
inconsistency for each heap tuple that should be represented in the
index, approximately 2 bytes of memory are needed per tuple. As
less memory is made available per tuple, the probability of missing
an inconsistency slowly increases. This approach limits the
overhead of verification significantly, while only slightly reducing
the probability of detecting a problem, especially for installations
where verification is treated as a routine maintenance task. Any
single absent or malformed tuple has a new opportunity to be
detected with each new verification attempt.
</span>
サマライズ構造は、<code class="varname">maintenance_work_mem</code>によってその大きさが制限されます。
インデックス中に存在すべきヒープタプルの非一貫性の検出失敗の確率が2%を超えないことを保証するために、タプルごとに約2バイトのメモリが必要です。
タプルごとに利用可能なメモリが少ないほど、非一貫性を見逃す可能性が徐々に増えていきます。
この手法によって検証のオーバーヘッドを大幅に減らせる一方、とりわけ検証を日常的な保守作業として行うシステムでは、問題を検出できる確率が少し減少するだけです。
失われた、あるいは不正なタプルは次の検証の機会に検出されます。
</p></div><div class="sect2" id="id-1.11.7.11.9"><div class="titlepage"><div><div><h3 class="title">F.2.3. <code class="filename">amcheck</code>を効果的に使う</h3></div></div></div><span class="original">
<title>Using <filename>amcheck</filename> Effectively</title>
</span><p>
<span class="original">
<filename>amcheck</filename> can be effective at detecting various types of
failure modes that <link
linkend="app-initdb-data-checksums"><application>data page
checksums</application></link> will always fail to catch. These include:
</span>
<code class="filename">amcheck</code>は、<a class="link" href="app-initdb.html#APP-INITDB-DATA-CHECKSUMS"><span class="application">データページチェックサム</span></a>が検知できないような、様々なタイプの障害モードを効果的に検知できます。
以下のようなものがあります。
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
<span class="original">
Structural inconsistencies caused by incorrect operator class
implementations.
</span>
演算子クラスの正しくない実装によって引き起こされる構造の非一貫性。
</p><p>
<span class="original">
This includes issues caused by the comparison rules of operating
system collations changing. Comparisons of datums of a collatable
type like <type>text</type> must be immutable (just as all
comparisons used for B-Tree index scans must be immutable), which
implies that operating system collation rules must never change.
Though rare, updates to operating system collation rules can
cause these issues. More commonly, an inconsistency in the
collation order between a master server and a standby server is
implicated, possibly because the <emphasis>major</emphasis> operating
system version in use is inconsistent. Such inconsistencies will
generally only arise on standby servers, and so can generally
only be detected on standby servers.
</span>
オペレーティングシステムの照合順の比較ルールの変更による問題も含まれます。
<code class="type">text</code>のような照合可能な型のデータの比較は、不変でなけれならず(B-Treeインデックスの走査のための、すべての比較が不変でなければならないのと同じことです)、それはオペレーティングシステムの照合順が決して変化してはいけないことを意味します。
まれであるとは言え、オペレーティングシステムの照合順ルールの更新は、これらの問題を引き起こします。
もっと普通に起こることとしては、マスターサーバとスタンバイサーバの照合順の違いが関与することです。
これは、使用されているオペレーティングシステムの<span class="emphasis"><em>メジャー</em></span>バージョンに一貫性がないことによります。
そうした一貫性の欠如は一般的にスタンバイサーバでのみ起こるので、通常スタンバイサーバでのみ検出されます。
</p><p>
<span class="original">
If a problem like this arises, it may not affect each individual
index that is ordered using an affected collation, simply because
<emphasis>indexed</emphasis> values might happen to have the same
absolute ordering regardless of the behavioral inconsistency. See
<xref linkend="locale"/> and <xref linkend="collation"/> for
further details about how <productname>PostgreSQL</productname> uses
operating system locales and collations.
</span>
そうした問題が起きても、影響を受けた照合順を使って順序付けられた個々のインデックスには影響ないかもしれません。
これは単純に、振る舞いにおける一貫性のなさにかかわらず<span class="emphasis"><em>インデックスされた</em></span>値は同じ絶対的な順になるからです。
<span class="productname">PostgreSQL</span>がオペレーティングシステムのロケールと照合順をどう使用するかについての更なる詳細については、<a class="xref" href="locale.html" title="23.1. ロケールのサポート">23.1</a>と<a class="xref" href="collation.html" title="23.2. 照合順序サポート">23.2</a>をご覧ください。
</p></li><li class="listitem"><p>
<span class="original">
Structural inconsistencies between indexes and the heap relations
that are indexed (when <parameter>heapallindexed</parameter>
verification is performed).
</span>
インデックスとインデックス付されたヒープリレーションの間の構造的な非一貫性(<em class="parameter"><code>heapallindexed</code></em>検証が実施される場合)
</p><p>
<span class="original">
There is no cross-checking of indexes against their heap relation
during normal operation. Symptoms of heap corruption can be subtle.
</span>
通常の操作においてはインデックスとそのヒープリレーションの間にはクロスチェックはありません。
ヒープの破壊による症状は些細なものかもしれません。
</p></li><li class="listitem"><p>
<span class="original">
Corruption caused by hypothetical undiscovered bugs in the
underlying <productname>PostgreSQL</productname> access method
code, sort code, or transaction management code.
</span>
依拠する<span class="productname">PostgreSQL</span>のアクセスメソッド、あるいはソート、トランザクション管理コードにおける、潜在的なまだ見つかっていないバグによる破損。
</p><p>
<span class="original">
Automatic verification of the structural integrity of indexes
plays a role in the general testing of new or proposed
<productname>PostgreSQL</productname> features that could plausibly allow a
logical inconsistency to be introduced. Verification of table
structure and associated visibility and transaction status
information plays a similar role. One obvious testing strategy
is to call <filename>amcheck</filename> functions continuously
when running the standard regression tests. See <xref
linkend="regress-run"/> for details on running the tests.
</span>
新規、あるいは提案中の <span class="productname">PostgreSQL</span>の機能が、論理的な非一貫性をもたらしかねないかどうか全般的にテストする際に、インデックスの構造的な一貫性の自動検証が役立ちます。
テーブル構造と、関連する可視性およびトランザクション状態情報の検証も同じような役割を果たします。
わかりやすいテスト戦略の一つは、関数標準の回帰テストを実行中に、<code class="filename">amcheck</code>を継続的に呼び出すことです。
テストの実行に関する詳細は、<a class="xref" href="regress-run.html" title="32.1. テストの実行">32.1</a>をご覧ください。
</p></li><li class="listitem"><p>
<span class="original">
File system or storage subsystem faults where checksums happen to
simply not be enabled.
</span>
単にチェックサムが有効になっていないファイルシステムあるいはストレージサブシステムの障害。
</p><p>
<span class="original">
Note that <filename>amcheck</filename> examines a page as represented in some
shared memory buffer at the time of verification if there is only a
shared buffer hit when accessing the block. Consequently,
<filename>amcheck</filename> does not necessarily examine data read from the
file system at the time of verification. Note that when checksums are
enabled, <filename>amcheck</filename> may raise an error due to a checksum
failure when a corrupt block is read into a buffer.
</span>
<code class="filename">amcheck</code>は、ブロックをアクセスする際に共有バッファがヒットした場合、検査時に共有メモリバッファ上に表現されたページを調査します。
結果として、<code class="filename">amcheck</code>は、検査時にファイルシステムから読み込んだデータを調査するとは限りません。
チェックサムが有効な場合、<code class="filename">amcheck</code>は壊れたブロックをバッファに読み込んだ際にチェックサム障害によるエラーを報告するかもしれません。
</p></li><li class="listitem"><p>
<span class="original">
Corruption caused by faulty RAM, or the broader memory subsystem.
</span>
欠陥のあるRAMあるいは、広範囲に渡るメモリサブシステムによる破損。
</p><p>
<span class="original">
<productname>PostgreSQL</productname> does not protect against correctable
memory errors and it is assumed you will operate using RAM that
uses industry standard Error Correcting Codes (ECC) or better
protection. However, ECC memory is typically only immune to
single-bit errors, and should not be assumed to provide
<emphasis>absolute</emphasis> protection against failures that
result in memory corruption.
</span>
<span class="productname">PostgreSQL</span>は、訂正可能なメモリーエラーからは身を守らないので、業界標準のエラー訂正コード(ECC)、あるいはもっと優れた保護機構を使ったRAMを使って運用する前提となっています。
しかし、ECCメモリは典型的には単一ビットエラーに対してのみ耐性があり、メモリ破損に起因する障害に対して<span class="emphasis"><em>完全な</em></span>保護を提供すると考えるべきではありません。
</p><p>
<span class="original">
When <parameter>heapallindexed</parameter> verification is
performed, there is generally a greatly increased chance of
detecting single-bit errors, since strict binary equality is
tested, and the indexed attributes within the heap are tested.
</span>
<em class="parameter"><code>heapallindexed</code></em>検証が実施されると、一般に1ビットエラーを検出する可能性が非常に高くなります。
これは、バイナリ一致を厳密にテストすることと、またヒープ内のインデックス付けされたアトリビュートをテストすることによります。
</p></li></ul></div><p>
<span class="original">
In general, <filename>amcheck</filename> can only prove the presence of
corruption; it cannot prove its absence.
</span>
一般的に、<code class="filename">amcheck</code>は破損の存在を証明することはできますが、破損がないことを証明することはできません。
</p></div><div class="sect2" id="id-1.11.7.11.10"><div class="titlepage"><div><div><h3 class="title">F.2.4. 破損の修復</h3></div></div></div><span class="original">
<title>Repairing Corruption</title>
</span><p>
<span class="original">
No error concerning corruption raised by <filename>amcheck</filename> should
ever be a false positive. <filename>amcheck</filename> raises
errors in the event of conditions that, by definition, should never
happen, and so careful analysis of <filename>amcheck</filename>
errors is often required.
</span>
<code class="filename">amcheck</code>が報告するエラーが関与する破損で、偽陽性のものはありません。
<code class="filename">amcheck</code>は、定義により発生してはならないはずの条件下で発生したエラーを報告するので、<code class="filename">amcheck</code>の報告するエラーを注意深く解析することがしばしば求められます。
</p><p>
<span class="original">
There is no general method of repairing problems that
<filename>amcheck</filename> detects. An explanation for the root cause of
an invariant violation should be sought. <xref
linkend="pageinspect"/> may play a useful role in diagnosing
corruption that <filename>amcheck</filename> detects. A <command>REINDEX</command>
may not be effective in repairing corruption.
</span>
<code class="filename">amcheck</code>が検出した問題を修復する一般的な方法はありません。
不変条件違反の根本的な原因の説明が求められます。
<code class="filename">amcheck</code>が検出した破損の診断には、<a class="xref" href="pageinspect.html" title="F.22. pageinspect">pageinspect</a>が有用な役割を担うかもしれません。
<code class="command">REINDEX</code>は破損の修復には効果的ではないかもしれません。
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="adminpack.html">前へ</a> </td><td width="20%" align="center"><a accesskey="u" href="contrib.html">上へ</a></td><td width="40%" align="right"> <a accesskey="n" href="auth-delay.html">次へ</a></td></tr><tr><td width="40%" align="left" valign="top">F.1. adminpack </td><td width="20%" align="center"><a accesskey="h" href="index.html">ホーム</a></td><td width="40%" align="right" valign="top"> F.3. auth_delay</td></tr></table></div></body></html>