バージョンごとのドキュメント一覧

30.2. データチェックサム #

<title>Data Checksums</title>

By default, data pages are not protected by checksums, but this can optionally be enabled for a cluster. When enabled, each data page includes a checksum that is updated when the page is written and verified each time the page is read. Only data pages are protected by checksums; internal data structures and temporary files are not. デフォルトでは、データページはチェックサムで保護されていませんが、オプションでデータベースクラスタに対して有効にすることができます。 チェックサムを有効にすると、各データページにチェックサムが含まれます。 チェックサムは、ページが書き込まれるときに更新され、ページが読み取られるたびに検証されます。 チェックサムによってデータページのみ保護されます。 内部データ構造と一時ファイルは保護されません。

Checksums are normally enabled when the cluster is initialized using <link linkend="app-initdb-data-checksums"><application>initdb</application></link>. They can also be enabled or disabled at a later time as an offline operation. Data checksums are enabled or disabled at the full cluster level, and cannot be specified individually for databases or tables. チェックサムは通常、initdbを使用してデータベースクラスタを初期化するときに有効にできます。 また、オフライン操作で後から有効化または無効化することもできます。 データチェックサムは、データベースクラスタ全体のレベルで有効または無効になり、データベースやテーブルに対して個別に指定することはできません。

The current state of checksums in the cluster can be verified by viewing the value of the read-only configuration variable <xref linkend="guc-data-checksums" /> by issuing the command <command>SHOW data_checksums</command>. データベースクラスタのチェックサムの現在の状態は、SHOW data_checksumsコマンドを実行して読み取り専用設定変数data_checksumsの値を参照することで確認できます。

When attempting to recover from page corruptions, it may be necessary to bypass the checksum protection. To do this, temporarily set the configuration parameter <xref linkend="guc-ignore-checksum-failure" />. ページ破損からの復旧を試みる場合、チェックサム保護のバイパスが必要な場合があります。 これを行うには、一時的に設定パラメータignore_checksum_failureを設定します。

30.2.1. オフラインでのチェックサムの有効化 #

<title>Off-line Enabling of Checksums</title>

The <link linkend="app-pgchecksums"><application>pg_checksums</application></link> application can be used to enable or disable data checksums, as well as verify checksums, on an offline cluster. pg_checksumsアプリケーションは、オフラインのデータベースクラスタ上でデータチェックサムを有効または無効にしたり、チェックサムを検証したりできます。