-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp-pgamcheck.html
573 lines (568 loc) · 49 KB
/
app-pgamcheck.html
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
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
<?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>pg_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 Vsnapshot" /><link rel="prev" href="app-ecpg.html" title="ecpg" /><link rel="next" href="app-pgbasebackup.html" title="pg_basebackup" /><meta name="viewport" content="width=device-width,initial-scale=1.0" /></head><body id="docContent" class="container-fluid col-10"><div class="other_version"><a href="https://www.postgresql.jp/document/">バージョンごとのドキュメント一覧</a></div><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="4" align="center"><a accesskey="h" href="index.html">PostgreSQL 17.0文書</a></th></tr><tr><td width="10%" align="left"></td><td width="10%" align="left"></td><td width="60%" align="center"><a href="reference-client.html" title="PostgreSQLクライアントアプリケーション">PostgreSQLクライアントアプリケーション</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?template=bug_report.yml&what-happened=version 17.0 : app-pgamcheck.html">誤訳等の報告
</a></div></td></tr><tr><td width="10%" align="left"><a accesskey="p" href="app-ecpg.html" title="ecpg">前へ</a> </td><td width="10%" align="left"><a accesskey="u" href="reference-client.html" title="PostgreSQLクライアントアプリケーション">上へ</a></td><td width="60%" align="center"><span class="application">pg_amcheck</span></td><td width="20%" align="right"> <a accesskey="n" href="app-pgbasebackup.html" title="pg_basebackup">次へ</a></td></tr></table><hr /></div><div class="refentry" id="APP-PGAMCHECK"><div class="titlepage"></div><a id="id-1.9.4.9.1" class="indexterm"></a><div class="refnamediv"><h2><span class="refentrytitle"><span class="application">pg_amcheck</span></span></h2><p>pg_amcheck<span class="original">
<refpurpose>checks for corruption in one or more
<productname>PostgreSQL</productname> databases</refpurpose>
</span> — 一つ以上の<span class="productname">PostgreSQL</span>データベースに破損がないかどうかを検査する</p></div><div class="refsynopsisdiv"><h2>概要</h2><div class="cmdsynopsis"><p id="id-1.9.4.9.4.1"><code class="command">pg_amcheck</code> [<em class="replaceable"><code>option</code></em>...] [<em class="replaceable"><code>dbname</code></em>]</p></div></div><div class="refsect1" id="id-1.9.4.9.5"><h2>説明</h2><span class="original">
<title>Description</title>
</span><p>
<span class="original">
<application>pg_amcheck</application> supports running
<xref linkend="amcheck"/>'s corruption checking functions against one or
more databases, with options to select which schemas, tables and indexes to
check, which kinds of checking to perform, and whether to perform the checks
in parallel, and if so, the number of parallel connections to establish and
use.
</span>
<span class="application">pg_amcheck</span>は、一つ以上のデータベースに対して、どのスキーマ、テーブル、インデックスを検査すべきか、どの種類の検査を実行するか、検査を並列に行うかどうか、並列に行うなら並列接続をいくつ確立するかを指定して<a class="xref" href="amcheck.html" title="F.1. amcheck — テーブルとインデックスの一貫性を検査するツール">amcheck</a>の破損検査関数を実行します。
</p><p>
<span class="original">
Only ordinary and toast table relations, materialized views, sequences, and
btree indexes are currently supported. Other relation types are silently
skipped.
</span>
通常のテーブルリレーションとTOASTテーブルリレーション、マテリアライズドビュー、シーケンスとBツリーインデックスのみが今のところサポートされています。
他のリレーションタイプは暗黙のうちにスキップされます。
</p><p>
<span class="original">
If <literal>dbname</literal> is specified, it should be the name of a
single database to check, and no other database selection options should
be present. Otherwise, if any database selection options are present,
all matching databases will be checked. If no such options are present,
the default database will be checked. Database selection options include
<option>&#45;-all</option>, <option>&#45;-database</option> and
<option>&#45;-exclude-database</option>. They also include
<option>&#45;-relation</option>, <option>&#45;-exclude-relation</option>,
<option>&#45;-table</option>, <option>&#45;-exclude-table</option>,
<option>&#45;-index</option>, and <option>&#45;-exclude-index</option>,
but only when such options are used with a three-part pattern
(e.g. <option>mydb*.myschema*.myrel*</option>). Finally, they include
<option>&#45;-schema</option> and <option>&#45;-exclude-schema</option>
when such options are used with a two-part pattern
(e.g. <option>mydb*.myschema*</option>).
</span>
<code class="literal">dbname</code>を指定するときは、検査すべき単一のデータベース名であるべきで、他のデータベースを選択するオプションは指定すべきではありません。
そうではなくてデータベースの選択オプションが指定されていると、一致するデータベースがすべて検査されます。
オプションを指定しない場合は、デフォルトのデータベースが検査されます。
データベース選択オプションには次のものが含まれます。
<code class="option">--all</code>、<code class="option">--database</code>、<code class="option">--exclude-database</code>。
また、次のオプションも含まれます。
<code class="option">--relation</code>、<code class="option">--exclude-relation</code>、<code class="option">--table</code>、<code class="option">--exclude-table</code>、<code class="option">--index</code>、<code class="option">--exclude-index</code>。
しかし、これらのオプションは、3つの部分からなるパターン(つまり<code class="option">mydb*.myschema*.myrel*</code>)を指定したときにのみ使用できます。
最後に、2つの部分からなるパターン(つまり<code class="option">mydb*.myschema*</code>)を指定した時に使用できる<code class="option">--schema</code>と<code class="option">--exclude-schema</code>があります。
</p><p>
<span class="original">
<replaceable>dbname</replaceable> can also be a
<link linkend="libpq-connstring">connection string</link>.
</span>
<em class="replaceable"><code>dbname</code></em>は、<a class="link" href="libpq-connect.html#LIBPQ-CONNSTRING" title="32.1.1. 接続文字列">接続文字列</a>でも構いません。
</p></div><div class="refsect1" id="id-1.9.4.9.6"><h2>オプション</h2><span class="original">
<title>Options</title>
</span><p>
<span class="original">
The following command-line options control what is checked:
</span>
以下のコマンドラインオプションは、何を検査するかを制御します。
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-a</code><br /></span><span class="term"><code class="option">--all</code></span></dt><dd><p>
<span class="original">
Check all databases, except for any excluded via
<option>&#45;-exclude-database</option>.
</span>
<code class="option">--exclude-database</code>で除外したものを除くすべてのデータベースを検査します。
</p></dd><dt><span class="term"><code class="option">-d <em class="replaceable"><code>pattern</code></em></code><br /></span><span class="term"><code class="option">--database=<em class="replaceable"><code>pattern</code></em></code></span></dt><dd><p>
<span class="original">
Check databases matching the specified
<link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>,
except for any excluded by <option>&#45;-exclude-database</option>.
This option can be specified more than once.
</span>
<code class="option">--exclude-database</code>で除外したものを除き、指定した<a class="link" href="app-psql.html#APP-PSQL-PATTERNS" title="パターン"><em class="replaceable"><code>パターン</code></em></a>にマッチするデータベースを検査します。
このオプションは2回以上指定できます。
</p></dd><dt><span class="term"><code class="option">-D <em class="replaceable"><code>pattern</code></em></code><br /></span><span class="term"><code class="option">--exclude-database=<em class="replaceable"><code>pattern</code></em></code></span></dt><dd><p>
<span class="original">
Exclude databases matching the given
<link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>.
This option can be specified more than once.
</span>
与えられた<a class="link" href="app-psql.html#APP-PSQL-PATTERNS" title="パターン"><em class="replaceable"><code>パターン</code></em></a>にマッチするデータベースを除外します。
このオプションは2回以上指定できます。
</p></dd><dt><span class="term"><code class="option">-i <em class="replaceable"><code>pattern</code></em></code><br /></span><span class="term"><code class="option">--index=<em class="replaceable"><code>pattern</code></em></code></span></dt><dd><p>
<span class="original">
Check indexes matching the specified
<link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>,
unless they are otherwise excluded.
This option can be specified more than once.
</span>
除外されていない限り、指定した<a class="link" href="app-psql.html#APP-PSQL-PATTERNS" title="パターン"><em class="replaceable"><code>パターン</code></em></a>にマッチするインデックスを検査します。
このオプションは2回以上指定できます。
</p><p>
<span class="original">
This is similar to the <option>&#45;-relation</option> option, except that
it applies only to indexes, not to other relation types.
</span>
これは、インデックスにのみ適用され、他のリレーションタイプには適用されないことを除いて<code class="option">--relation</code>オプションに類似しています。
</p></dd><dt><span class="term"><code class="option">-I <em class="replaceable"><code>pattern</code></em></code><br /></span><span class="term"><code class="option">--exclude-index=<em class="replaceable"><code>pattern</code></em></code></span></dt><dd><p>
<span class="original">
Exclude indexes matching the specified
<link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>.
This option can be specified more than once.
</span>
与えられた<a class="link" href="app-psql.html#APP-PSQL-PATTERNS" title="パターン"><em class="replaceable"><code>パターン</code></em></a>にマッチするインデックスを除外します。
このオプションは2回以上指定できます。
</p><p>
<span class="original">
This is similar to the <option>&#45;-exclude-relation</option> option,
except that it applies only to indexes, not other relation types.
</span>
これは、インデックスにのみ適用され、他のリレーションタイプには適用されないことを除いて<code class="option">--exclude-relation</code>オプションに類似しています。
</p></dd><dt><span class="term"><code class="option">-r <em class="replaceable"><code>pattern</code></em></code><br /></span><span class="term"><code class="option">--relation=<em class="replaceable"><code>pattern</code></em></code></span></dt><dd><p>
<span class="original">
Check relations matching the specified
<link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>,
unless they are otherwise excluded.
This option can be specified more than once.
</span>
除外されていない限り、<a class="link" href="app-psql.html#APP-PSQL-PATTERNS" title="パターン"><em class="replaceable"><code>パターン</code></em></a>にマッチするリレーションを検査します。
このオプションは2回以上指定できます。
</p><p>
<span class="original">
Patterns may be unqualified, e.g. <literal>myrel*</literal>, or they
may be schema-qualified, e.g. <literal>myschema*.myrel*</literal> or
database-qualified and schema-qualified, e.g.
<literal>mydb*.myschema*.myrel*</literal>. A database-qualified
pattern will add matching databases to the list of databases to be
checked.
</span>
パターンはたとえば<code class="literal">myrel*</code>のように修飾されていなくても、<code class="literal">myschema*.myrel*</code>のようにスキーマ修飾されていても、<code class="literal">mydb*.myschema*.myrel*</code>のようにデータベース及びスキーマ修飾されていても構いません。
データベース修飾パターンは、マッチするデータベースを検査対象のデータベースのリストに追加します。
</p></dd><dt><span class="term"><code class="option">-R <em class="replaceable"><code>pattern</code></em></code><br /></span><span class="term"><code class="option">--exclude-relation=<em class="replaceable"><code>pattern</code></em></code></span></dt><dd><p>
<span class="original">
Exclude relations matching the specified
<link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>.
This option can be specified more than once.
</span>
指定された<a class="link" href="app-psql.html#APP-PSQL-PATTERNS" title="パターン"><em class="replaceable"><code>パターン</code></em></a>にマッチするリレーションを除外します。
このオプションは2回以上指定できます。
</p><p>
<span class="original">
As with <option>&#45;-relation</option>, the
<link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link> may be unqualified, schema-qualified,
or database- and schema-qualified.
</span>
<code class="option">--relation</code>におけるのと同様、<a class="link" href="app-psql.html#APP-PSQL-PATTERNS" title="パターン"><em class="replaceable"><code>パターン</code></em></a>は修飾なし、スキーマ修飾、スキーマとデータベース修飾のどれでも構いません。
</p></dd><dt><span class="term"><code class="option">-s <em class="replaceable"><code>pattern</code></em></code><br /></span><span class="term"><code class="option">--schema=<em class="replaceable"><code>pattern</code></em></code></span></dt><dd><p>
<span class="original">
Check tables and indexes in schemas matching the specified
<link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>, unless they are otherwise excluded.
This option can be specified more than once.
</span>
除外されていない限り、指定した<a class="link" href="app-psql.html#APP-PSQL-PATTERNS" title="パターン"><em class="replaceable"><code>パターン</code></em></a>にマッチするスキーマ内のテーブルとインデックスを検査します。
このオプションは2回以上指定できます。
</p><p>
<span class="original">
To select only tables in schemas matching a particular pattern,
consider using something like
<literal>&#45;-table=SCHEMAPAT.* &#45;-no-dependent-indexes</literal>.
To select only indexes, consider using something like
<literal>&#45;-index=SCHEMAPAT.*</literal>.
</span>
特定のパターンにマッチするスキーマ内のテーブルだけを選択するには、<code class="literal">--table=SCHEMAPAT.* --no-dependent-indexes</code>のような使い方を考慮してください。
インデックスのみを選択するには、<code class="literal">--index=SCHEMAPAT.*</code>のような使い方を考慮してください。
</p><p>
<span class="original">
A schema pattern may be database-qualified. For example, you may
write <literal>&#45;-schema=mydb*.myschema*</literal> to select
schemas matching <literal>myschema*</literal> in databases matching
<literal>mydb*</literal>.
</span>
スキーマパターンはデータベース修飾でも構いません。
たとえば、<code class="literal">mydb*</code>にマッチするデータベース内の<code class="literal">myschema*</code>にマッチするスキーマを選択するには、<code class="literal">--schema=mydb*.myschema*</code>のように書くことができます。
</p></dd><dt><span class="term"><code class="option">-S <em class="replaceable"><code>pattern</code></em></code><br /></span><span class="term"><code class="option">--exclude-schema=<em class="replaceable"><code>pattern</code></em></code></span></dt><dd><p>
<span class="original">
Exclude tables and indexes in schemas matching the specified
<link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>.
This option can be specified more than once.
</span>
指定した<a class="link" href="app-psql.html#APP-PSQL-PATTERNS" title="パターン"><em class="replaceable"><code>パターン</code></em></a>にマッチするスキーマ内のテーブルとインデックスを除外します。
このオプションは2回以上指定できます。
</p><p>
<span class="original">
As with <option>&#45;-schema</option>, the pattern may be
database-qualified.
</span>
<code class="option">--schema</code>と同様、パターンはデータベース修飾でも構いません。
</p></dd><dt><span class="term"><code class="option">-t <em class="replaceable"><code>pattern</code></em></code><br /></span><span class="term"><code class="option">--table=<em class="replaceable"><code>pattern</code></em></code></span></dt><dd><p>
<span class="original">
Check tables matching the specified
<link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>,
unless they are otherwise excluded.
This option can be specified more than once.
</span>
除外されていない限り、指定した<a class="link" href="app-psql.html#APP-PSQL-PATTERNS" title="パターン"><em class="replaceable"><code>パターン</code></em></a>にマッチするスキーマ内のテーブルを検査します。
このオプションは2回以上指定できます。
</p><p>
<span class="original">
This is similar to the <option>&#45;-relation</option> option, except that
it applies only to tables, materialized views, and sequences, not to
indexes.
</span>
これは、テーブル、マテリアライズドビュー、シーケンスにのみ適用され、インデックスには適用されないことを除いて<code class="option">--relation</code>オプションに類似しています。
</p></dd><dt><span class="term"><code class="option">-T <em class="replaceable"><code>pattern</code></em></code><br /></span><span class="term"><code class="option">--exclude-table=<em class="replaceable"><code>pattern</code></em></code></span></dt><dd><p>
<span class="original">
Exclude tables matching the specified
<link linkend="app-psql-patterns"><replaceable class="parameter">pattern</replaceable></link>.
This option can be specified more than once.
</span>
指定した<a class="link" href="app-psql.html#APP-PSQL-PATTERNS" title="パターン"><em class="replaceable"><code>パターン</code></em></a>にマッチするテーブルを除外します。
このオプションは2回以上指定できます。
</p><p>
<span class="original">
This is similar to the <option>&#45;-exclude-relation</option> option,
except that it applies only to tables, materialized views, and
sequences, not to indexes.
</span>
これは、テーブル、マテリアライズドビュー、シーケンスにのみ適用され、インデックスには適用されないことを除いて<code class="option">--exclude-relation</code>オプションに類似しています。
</p></dd><dt><span class="term"><code class="option">--no-dependent-indexes</code></span></dt><dd><p>
<span class="original">
By default, if a table is checked, any btree indexes of that table
will also be checked, even if they are not explicitly selected by
an option such as <literal>&#45;-index</literal> or
<literal>&#45;-relation</literal>. This option suppresses that behavior.
</span>
デフォルトでは、<code class="literal">--index</code>や<code class="literal">--relation</code>オプションで明示的に選択されていなくても、テーブルが検査される際にそのテーブルのBツリーインデックスも検査されます。
このオプションはこの振る舞いを抑止します。
</p></dd><dt><span class="term"><code class="option">--no-dependent-toast</code></span></dt><dd><p>
<span class="original">
By default, if a table is checked, its toast table, if any, will also
be checked, even if it is not explicitly selected by an option
such as <literal>&#45;-table</literal> or <literal>&#45;-relation</literal>.
This option suppresses that behavior.
</span>
デフォルトでは、<code class="literal">--table</code>や<code class="literal">--relation</code>オプションで明示的に選択されていなくても、テーブルが検査される際にそのテーブルのTOASTテーブルも検査されます。
このオプションはこの振る舞いを抑止します。
</p></dd><dt><span class="term"><code class="option">--no-strict-names</code></span></dt><dd><p>
<span class="original">
By default, if an argument to <literal>&#45;-database</literal>,
<literal>&#45;-table</literal>, <literal>&#45;-index</literal>,
or <literal>&#45;-relation</literal> matches no objects, it is a fatal
error. This option downgrades that error to a warning.
</span>
デフォルトでは、<code class="literal">--database</code>、<code class="literal">--table</code>、<code class="literal">--index</code>、<code class="literal">--relation</code>への引数がどのオブジェクトにもマッチしなければ、フェイタルエラーが起こります。
このオプションはそのエラーをワーニングへと格下げします。
</p></dd></dl></div><p>
</p><p>
<span class="original">
The following command-line options control checking of tables:
</span>
次のコマンドラインオプションはテーブルの検査を制御します。
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--exclude-toast-pointers</code></span></dt><dd><p>
<span class="original">
By default, whenever a toast pointer is encountered in a table,
a lookup is performed to ensure that it references apparently-valid
entries in the toast table. These checks can be quite slow, and this
option can be used to skip them.
</span>
デフォルトでは、テーブル中のTOASTポインタに遭遇すると必ずTOASTテーブル中の明らかに有効なエントリを参照していることを確認するために検索が行われます。
このチェックは非常に遅くなることがあり、このオプションはこれを省略するために使うことができます。
</p></dd><dt><span class="term"><code class="option">--on-error-stop</code></span></dt><dd><p>
<span class="original">
After reporting all corruptions on the first page of a table where
corruption is found, stop processing that table relation and move on
to the next table or index.
</span>
破損が見つかった最初のテーブルのページに関してすべての破損の報告を行った後そのテーブルリレーションの処理を中断し、次のテーブルあるいはインデックスに進みます。
</p><p>
<span class="original">
Note that index checking always stops after the first corrupt page.
This option only has meaning relative to table relations.
</span>
インデックスの検査は、最初の破損したページの後で常に停止することに留意してください。
このオプションは、テーブルリレーションに関してのみ意味があります。
</p></dd><dt><span class="term"><code class="option">--skip=<em class="replaceable"><code>option</code></em></code></span></dt><dd><p>
<span class="original">
If <literal>all-frozen</literal> is given, table corruption checks
will skip over pages in all tables that are marked as all frozen.
</span>
<code class="literal">all-frozen</code>が与えられると、テーブル破損検査は、すべて凍結されていると印が付いたすべてのテーブルの中のページをスキップします。
</p><p>
<span class="original">
If <literal>all-visible</literal> is given, table corruption checks
will skip over pages in all tables that are marked as all visible.
</span>
<code class="literal">all-visible</code>が与えられると、テーブル破損検査は、すべて可視と印が付いたすべてのテーブルの中のページをスキップします。
</p><p>
<span class="original">
By default, no pages are skipped. This can be specified as
<literal>none</literal>, but since this is the default, it need not be
mentioned.
</span>
デフォルトではページをスキップすることはありません。
<code class="literal">none</code>と指定することもできますが、これがデフォルトなのでそのように指定する必要はありません。
</p></dd><dt><span class="term"><code class="option">--startblock=<em class="replaceable"><code>block</code></em></code></span></dt><dd><p>
<span class="original">
Start checking at the specified block number. An error will occur if
the table relation being checked has fewer than this number of blocks.
This option does not apply to indexes, and is probably only useful
when checking a single table relation. See <literal>&#45;-endblock</literal>
for further caveats.
</span>
指定したブロック番号から検査を開始します。
検査しているテーブルリレーションのブロック数がこのブロック数よりも小さければエラーが生じます。
このオプションはインデックスには適用されず、おそらく単一のテーブルリレーションを検査するときにのみ意味があるでしょう。
それ以外の警告については<code class="literal">--endblock</code>を参照してください。
</p></dd><dt><span class="term"><code class="option">--endblock=<em class="replaceable"><code>block</code></em></code></span></dt><dd><p>
<span class="original">
End checking at the specified block number. An error will occur if the
table relation being checked has fewer than this number of blocks.
This option does not apply to indexes, and is probably only useful when
checking a single table relation. If both a regular table and a toast
table are checked, this option will apply to both, but higher-numbered
toast blocks may still be accessed while validating toast pointers,
unless that is suppressed using
<option>&#45;-exclude-toast-pointers</option>.
</span>
指定したブロック番号で検査を終了します。
検査しているテーブルリレーションのブロック数がこのブロック数よりも小さければエラーが生じます。
このオプションはインデックスには適用されず、おそらく単一のテーブルリレーションを検査するときにのみ意味があるでしょう。
通常のテーブルとTOASTテーブルの両方が検査される際にはこのオプションはその両方に適用されますが、<code class="option">--exclude-toast-pointers</code>を使って抑止していない限りTOASTポインタを検証中により大きな番号のTOASTブロックがアクセスされるかも知れません。
</p></dd></dl></div><p>
</p><p>
<span class="original">
The following command-line options control checking of B-tree indexes:
</span>
以下のコマンドラインオプションはBツリーインデックスの検査を制御します。
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">--checkunique</code></span></dt><dd><p>
<span class="original">
For each index with unique constraint checked, verify that no more than
one among duplicate entries is visible in the index using <xref linkend="amcheck"/>'s
<option>checkunique</option> option.
</span>
一意性制約を検査するインデックスごとに、<a class="xref" href="amcheck.html" title="F.1. amcheck — テーブルとインデックスの一貫性を検査するツール">amcheck</a>の<code class="option">checkunique</code>オプションを使って重複エントリのうちインデックスで可視であるのは1つだけであることを検証します。
</p></dd><dt><span class="term"><code class="option">--heapallindexed</code></span></dt><dd><p>
<span class="original">
For each index checked, verify the presence of all heap tuples as index
tuples in the index using <xref linkend="amcheck"/>'s
<option>heapallindexed</option> option.
</span>
検査しているインデックスごとに、<a class="xref" href="amcheck.html" title="F.1. amcheck — テーブルとインデックスの一貫性を検査するツール">amcheck</a>の<code class="option">heapallindexed</code>オプションを使ってすべてのヒープタプルがインデックス中のインデックスタプルとして存在していることを検証します。
</p></dd><dt><span class="term"><code class="option">--parent-check</code></span></dt><dd><p>
<span class="original">
For each btree index checked, use <xref linkend="amcheck"/>'s
<function>bt_index_parent_check</function> function, which performs
additional checks of parent/child relationships during index checking.
</span>
検査しているBツリーインデックスごとに、インデックス検査中に親/子関係の追加の検査を行う<a class="xref" href="amcheck.html" title="F.1. amcheck — テーブルとインデックスの一貫性を検査するツール">amcheck</a>の<code class="function">bt_index_parent_check</code>関数を使います。
</p><p>
<span class="original">
The default is to use <application>amcheck</application>'s
<function>bt_index_check</function> function, but note that use of the
<option>&#45;-rootdescend</option> option implicitly selects
<function>bt_index_parent_check</function>.
</span>
デフォルトでは<span class="application">amcheck</span>の<code class="function">bt_index_check</code>関数を使いますが、<code class="option">--rootdescend</code>オプションを使うと暗黙的に<code class="function">bt_index_parent_check</code>を選択することに注意してください。
</p></dd><dt><span class="term"><code class="option">--rootdescend</code></span></dt><dd><p>
<span class="original">
For each index checked, re-find tuples on the leaf level by performing a
new search from the root page for each tuple using
<xref linkend="amcheck"/>'s <option>rootdescend</option> option.
</span>
検査しているインデックスごとに、<a class="xref" href="amcheck.html" title="F.1. amcheck — テーブルとインデックスの一貫性を検査するツール">amcheck</a>の<code class="option">rootdescend</code>オプションを使い、各タプルに関してルートページから新たに検索を実施してリーフレベルのタプルを再発見します。
</p><p>
<span class="original">
Use of this option implicitly also selects the
<option>&#45;-parent-check</option> option.
</span>
このオプションを使うと<code class="option">--parent-check</code>オプションも暗黙的に選択します。
</p><p>
<span class="original">
This form of verification was originally written to help in the
development of btree index features. It may be of limited use or even
of no use in helping detect the kinds of corruption that occur in
practice. It may also cause corruption checking to take considerably
longer and consume considerably more resources on the server.
</span>
この形式の検証は、元々はBツリーインデックスの機能の開発を支援するために作られました。
実際に発生する類の破損を検出するための支援としては限定的、あるいはまったく無用かも知れません。
また、これは破損検査に要する時間がかなり長くなったり、サーバでかなり多くのリソースを消費する原因になるかも知れません。
</p></dd></dl></div><p>
</p><div class="warning"><h3 class="title">警告</h3><p>
<span class="original">
The extra checks performed against B-tree indexes when the
<option>&#45;-parent-check</option> option or the
<option>&#45;-rootdescend</option> option is specified require
relatively strong relation-level locks. These checks are the only
checks that will block concurrent data modification from
<command>INSERT</command>, <command>UPDATE</command>, and
<command>DELETE</command> commands.
</span>
<code class="option">--parent-check</code>オプション、あるいは<code class="option">--rootdescend</code>オプションが指定された時にBツリーインデックスに対して行われる追加の検査では、比較的強いリレーションレベルのロックが必要です。
この検査だけが、<code class="command">INSERT</code>、<code class="command">UPDATE</code>、<code class="command">DELETE</code>コマンドによる並行するデータ変更をブロックする検査です。
</p></div><p>
<span class="original">
The following command-line options control the connection to the server:
</span>
以下のコマンドラインオプションは、サーバへの接続を制御します。
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-h <em class="replaceable"><code>hostname</code></em></code><br /></span><span class="term"><code class="option">--host=<em class="replaceable"><code>hostname</code></em></code></span></dt><dd><p>
<span class="original">
Specifies the host name of the machine on which the server is running.
If the value begins with a slash, it is used as the directory for the
Unix domain socket.
</span>
サーバが実行中のマシンのホスト名を指定します。
値がスラッシュで始まると、Unixドメインソケットのディレクトリとして使用されます。
</p></dd><dt><span class="term"><code class="option">-p <em class="replaceable"><code>port</code></em></code><br /></span><span class="term"><code class="option">--port=<em class="replaceable"><code>port</code></em></code></span></dt><dd><p>
<span class="original">
Specifies the TCP port or local Unix domain socket file extension on
which the server is listening for connections.
</span>
TCPポートあるいはサーバが接続をリッスンしているマシン上のUnixドメインソケットファイルの拡張子を指定します。
</p></dd><dt><span class="term"><code class="option">-U</code><br /></span><span class="term"><code class="option">--username=<em class="replaceable"><code>username</code></em></code></span></dt><dd><p>
<span class="original">
User name to connect as.
</span>
接続するユーザ名です。
</p></dd><dt><span class="term"><code class="option">-w</code><br /></span><span class="term"><code class="option">--no-password</code></span></dt><dd><p>
<span class="original">
Never issue a password prompt. If the server requires password
authentication and a password is not available by other means such as
a <filename>.pgpass</filename> file, the connection attempt will fail.
This option can be useful in batch jobs and scripts where no user is
present to enter a password.
</span>
パスワードの入力を促しません。
サーバがパスワード認証を必要とし、かつ、<code class="filename">.pgpass</code>ファイルなどの他の方法が利用できない場合、接続試行は失敗します。
バッチジョブやスクリプトなどパスワードを入力するユーザが存在しない場合にこのオプションは有用かもしれません。
</p></dd><dt><span class="term"><code class="option">-W</code><br /></span><span class="term"><code class="option">--password</code></span></dt><dd><p>
<span class="original">
Force <application>pg_amcheck</application> to prompt for a password
before connecting to a database.
</span>
<span class="application">pg_amcheck</span>がデータベースに接続する前にパスワードのプロンプトを表示することを強制します。
</p><p>
<span class="original">
This option is never essential, since
<application>pg_amcheck</application> will automatically prompt for a
password if the server demands password authentication. However,
<application>pg_amcheck</application> will waste a connection attempt
finding out that the server wants a password. In some cases it is
worth typing <option>-W</option> to avoid the extra connection attempt.
</span>
サーバがパスワード認証を必要とするときには<span class="application">pg_amcheck</span>はパスワードを自動的に要求するので、このオプションは絶対に必要というものではありません。
しかし、<span class="application">pg_amcheck</span>はサーバがパスワードを必要としているかどうかを確認するために無駄な接続の試みをします。
ある種の状況では余分な接続の試みを避けるために<code class="option">-W</code>をタイプする価値があります。
</p></dd><dt><span class="term"><code class="option">--maintenance-db=<em class="replaceable"><code>dbname</code></em></code></span></dt><dd><p>
<span class="original">
Specifies a database or
<link linkend="libpq-connstring">connection string</link> to be
used to discover the list of databases to be checked. If neither
<option>&#45;-all</option> nor any option including a database pattern is
used, no such connection is required and this option does nothing.
Otherwise, any connection string parameters other than
the database name which are included in the value for this option
will also be used when connecting to the databases
being checked. If this option is omitted, the default is
<literal>postgres</literal> or, if that fails,
<literal>template1</literal>.
</span>
データベースあるいは検査対象データベースのリストを発見するために使われる<a class="link" href="libpq-connect.html#LIBPQ-CONNSTRING" title="32.1.1. 接続文字列">接続文字列</a>を指定します。
<code class="option">--all</code>あるいはデータベースパターンを含むオプションが使われていなければ、そうした接続は必要ではなく、このオプションは何もしません。
そうでなければ、このオプションの値に含まれるデータベース名が、検査対象のデータベースに接続する際にも使われます。
このオプションが省略されるとデフォルトは<code class="literal">postgres</code>、あるいはそれが失敗すれば<code class="literal">template1</code>となります。
</p></dd></dl></div><p>
</p><p>
<span class="original">
Other options are also available:
</span>
他のオプションも利用可能です。
</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="option">-e</code><br /></span><span class="term"><code class="option">--echo</code></span></dt><dd><p>
<span class="original">
Echo to stdout all SQL sent to the server.
</span>
サーバに送られたすべてのSQLを標準出力にそのまま表示します。
</p></dd><dt><span class="term"><code class="option">-j <em class="replaceable"><code>num</code></em></code><br /></span><span class="term"><code class="option">--jobs=<em class="replaceable"><code>num</code></em></code></span></dt><dd><p>
<span class="original">
Use <replaceable>num</replaceable> concurrent connections to the server,
or one per object to be checked, whichever is less.
</span>
サーバへの<em class="replaceable"><code>num</code></em>並列接続か、検査対象オブジェクト1つにつき1本の接続のどちらか少ない方を使います。
</p><p>
<span class="original">
The default is to use a single connection.
</span>
デフォルトでは単一の接続を使います。
</p></dd><dt><span class="term"><code class="option">-P</code><br /></span><span class="term"><code class="option">--progress</code></span></dt><dd><p>
<span class="original">
Show progress information. Progress information includes the number
of relations for which checking has been completed, and the total
size of those relations. It also includes the total number of relations
that will eventually be checked, and the estimated size of those
relations.
</span>
進捗状況の情報を表示します。
進捗状況情報には、検査が完了したリレーションの数と(検査が完了した)リレーションの合計サイズが含まれます。
最終的に検査されるリレーションの全数と(これら(最終的に検査される)の)リレーションのサイズの見積もりも含まれます。
</p></dd><dt><span class="term"><code class="option">-v</code><br /></span><span class="term"><code class="option">--verbose</code></span></dt><dd><p>
<span class="original">
Print more messages. In particular, this will print a message for
each relation being checked, and will increase the level of detail
shown for server errors.
</span>
より多くのメッセージを表示します。
とりわけ、これは検査している個々のリレーションを表示し、サーバエラーに関しては詳細度のレベルを上げます。
</p></dd><dt><span class="term"><code class="option">-V</code><br /></span><span class="term"><code class="option">--version</code></span></dt><dd><p>
<span class="original">
Print the <application>pg_amcheck</application> version and exit.
</span>
<span class="application">pg_amcheck</span>のバージョンを表示して終了します。
</p></dd><dt><span class="term"><code class="option">--install-missing</code><br /></span><span class="term"><code class="option">--install-missing=<em class="replaceable"><code>schema</code></em></code></span></dt><dd><p>
<span class="original">
Install any missing extensions that are required to check the
database(s). If not yet installed, each extension's objects will be
installed into the given
<replaceable class="parameter">schema</replaceable>, or if not specified
into schema <literal>pg_catalog</literal>.
</span>
データベースを検査するのに必要な拡張で漏れているものをインストールします。
もしまだインストールされていなければ、各拡張のオブジェクトは与えられた<em class="replaceable"><code>schema</code></em>、あるいは指定されていなければ<code class="literal">pg_catalog</code>スキーマにインストールされます。
</p><p>
<span class="original">
At present, the only required extension is <xref linkend="amcheck"/>.
</span>
今の所唯一必要な拡張は<a class="xref" href="amcheck.html" title="F.1. amcheck — テーブルとインデックスの一貫性を検査するツール">amcheck</a>です。
</p></dd><dt><span class="term"><code class="option">-?</code><br /></span><span class="term"><code class="option">--help</code></span></dt><dd><p>
<span class="original">
Show help about <application>pg_amcheck</application> command line
arguments, and exit.
</span>
<span class="application">pg_amcheck</span>コマンド行引数に関するヘルプを表示して終了します。
</p></dd></dl></div><p>
</p></div><div class="refsect1" id="id-1.9.4.9.7"><h2>環境</h2><span class="original">
<title>Environment</title>
</span><p>
<span class="original">
<command>pg_amcheck</command>, like most other <productname>PostgreSQL</productname>
utilities,
also uses the environment variables supported by <application>libpq</application>
(see <xref linkend="libpq-envars"/>).
</span>
<code class="command">pg_amcheck</code>は、他のほとんどの<span class="productname">PostgreSQL</span>ユーティリティと同様、<span class="application">libpq</span>がサポートする環境変数(<a class="xref" href="libpq-envars.html" title="32.15. 環境変数">32.15</a>参照)も使います。
</p><p>
<span class="original">
The environment variable <envar>PG_COLOR</envar> specifies whether to use
color in diagnostic messages. Possible values are
<literal>always</literal>, <literal>auto</literal> and
<literal>never</literal>.
</span>
《機械翻訳》環境変数<code class="envar">PG_COLOR</code>は診断メッセージで色を使うかどうかを指定します。
可能な値は<code class="literal">always</code>、<code class="literal">auto</code>、<code class="literal">never</code>です。
</p></div><div class="refsect1" id="id-1.9.4.9.8"><h2>注釈</h2><span class="original">
<title>Notes</title>
</span><p>
<span class="original">
<application>pg_amcheck</application> is designed to work with
<productname>PostgreSQL</productname> 14.0 and later.
</span>
<span class="application">pg_amcheck</span> は<span class="productname">PostgreSQL</span> 14.0以降で動作するように設計されています。
</p></div><div class="refsect1" id="id-1.9.4.9.9"><h2>関連項目</h2><span class="original">
<title>See Also</title>
</span><span class="simplelist"><a class="xref" href="amcheck.html" title="F.1. amcheck — テーブルとインデックスの一貫性を検査するツール">amcheck</a></span></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="app-ecpg.html" title="ecpg">前へ</a> </td><td width="20%" align="center"><a accesskey="u" href="reference-client.html" title="PostgreSQLクライアントアプリケーション">上へ</a></td><td width="40%" align="right"> <a accesskey="n" href="app-pgbasebackup.html" title="pg_basebackup">次へ</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="application">ecpg</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 17.0文書">ホーム</a></td><td width="40%" align="right" valign="top"> <span class="application">pg_basebackup</span></td></tr></table></div></body></html>