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

F.6. basic_archive — WALアーカイブモジュールの例 #

<title>basic_archive &mdash; an example WAL archive module</title>

<filename>basic_archive</filename> is an example of an archive module. This module copies completed WAL segment files to the specified directory. This may not be especially useful, but it can serve as a starting point for developing your own archive module. For more information about archive modules, see <xref linkend="archive-modules"/>. basic_archiveはアーカイブモジュールの例です。 このモジュールは、完成したWALセグメントファイルを指定されたディレクトリにコピーします。 これは特に有用ではありませんが、独自のアーカイブモジュールを開発するための出発点として役立ちます。 アーカイブモジュールの詳細は第51章を参照してください。

In order to function, this module must be loaded via <xref linkend="guc-archive-library"/>, and <xref linkend="guc-archive-mode"/> must be enabled. 機能するには、このモジュールをarchive_library経由でロードし、archive_modeを有効にする必要があります。

F.6.1. 設定パラメータ #

<title>Configuration Parameters</title>
basic_archive.archive_directory (string)

The directory where the server should copy WAL segment files. This directory must already exist. The default is an empty string, which effectively halts WAL archiving, but if <xref linkend="guc-archive-mode"/> is enabled, the server will accumulate WAL segment files in the expectation that a value will soon be provided. サーバがWALセグメントファイルをコピーするディレクトリです。 このディレクトリは既に存在している必要があります。 デフォルトは空文字列で、事実上WALアーカイブを停止します。 しかしarchive_modeが有効になっている場合、サーバはこの値が間もなく提供されることを期待してWALセグメントファイルを蓄積します。

These parameters must be set in <filename>postgresql.conf</filename>. Typical usage might be: これらのパラメータはpostgresql.confの中で設定しなければなりません。 典型的な使用方法は以下のようになります。

# postgresql.conf
archive_mode = 'on'
archive_library = 'basic_archive'
basic_archive.archive_directory = '/path/to/archive/directory'

F.6.2. 注釈 #

<title>Notes</title>

Server crashes may leave temporary files with the prefix <filename>archtemp</filename> in the archive directory. It is recommended to delete such files before restarting the server after a crash. It is safe to remove such files while the server is running as long as they are unrelated to any archiving still in progress, but users should use extra caution when doing so. サーバーがクラッシュすると、アーカイブ・ディレクトリに接頭辞archtempを持つ一時ファイルが残る場合があります。 クラッシュ後にサーバーを再起動する前に、このようなファイルを削除することをお薦めします。 このようなファイルは、進行中のアーカイブと無関係であれば、サーバーの実行中に削除しても安全ですが、その際には十分な注意が必要です。

F.6.3. 作者 #

<title>Author</title>

Nathan Bossart