-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive-modules.html
More file actions
43 lines (43 loc) · 7.49 KB
/
archive-modules.html
File metadata and controls
43 lines (43 loc) · 7.49 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
<?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>第49章 アーカイブモジュール</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="replication-origins.html" title="第48章 レプリケーション進捗の追跡" /><link rel="next" href="archive-module-init.html" title="49.1. 初期化関数" /><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 18.3文書</a></th></tr><tr><td width="10%" align="left"></td><td width="10%" align="left"></td><td width="60%" align="center"><a href="server-programming.html" title="パート V. サーバプログラミング">パート V. サーバプログラミング</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 18.3 : archive-modules.html">誤訳等の報告
</a></div></td></tr><tr><td width="10%" align="left"><a accesskey="p" href="replication-origins.html" title="第48章 レプリケーション進捗の追跡">前へ</a> </td><td width="10%" align="left"><a accesskey="u" href="server-programming.html" title="パート V. サーバプログラミング">上へ</a></td><td width="60%" align="center">第49章 アーカイブモジュール</td><td width="20%" align="right"> <a accesskey="n" href="archive-module-init.html" title="49.1. 初期化関数">次へ</a></td></tr></table><hr /></div><div class="chapter" id="ARCHIVE-MODULES"><div class="titlepage"><div><div><h2 class="title">第49章 アーカイブモジュール</h2></div></div></div><div class="toc"><p><strong>目次</strong></p><dl class="toc"><dt><span class="sect1"><a href="archive-module-init.html">49.1. 初期化関数</a></span></dt><dt><span class="sect1"><a href="archive-module-callbacks.html">49.2. アーカイブモジュールコールバック</a></span></dt><dd><dl><dt><span class="sect2"><a href="archive-module-callbacks.html#ARCHIVE-MODULE-STARTUP">49.2.1. スタートアップコールバック</a></span></dt><dt><span class="sect2"><a href="archive-module-callbacks.html#ARCHIVE-MODULE-CHECK">49.2.2. チェックコールバック</a></span></dt><dt><span class="sect2"><a href="archive-module-callbacks.html#ARCHIVE-MODULE-ARCHIVE">49.2.3. アーカイブコールバック</a></span></dt><dt><span class="sect2"><a href="archive-module-callbacks.html#ARCHIVE-MODULE-SHUTDOWN">49.2.4. シャットダウンコールバック</a></span></dt></dl></dd></dl></div><span class="original">
<title>Archive Modules</title>
</span><a id="id-1.8.16.2" class="indexterm"></a><a id="id-1.8.16.3" class="indexterm"></a><p>
<span class="original">
PostgreSQL provides infrastructure to create custom modules for continuous
archiving (see <xref linkend="continuous-archiving"/>). While archiving via
a shell command (i.e., <xref linkend="guc-archive-command"/>) is much
simpler, a custom archive module will often be considerably more robust and
performant.
</span>
PostgreSQLは、継続的アーカイブのためのカスタムモジュールを作成するためのインフラストラクチャを提供します(<a class="xref" href="continuous-archiving.html" title="25.3. 継続的アーカイブとポイントインタイムリカバリ(PITR)">25.3</a>を参照)。
シェルコマンド(すなわち<a class="xref" href="runtime-config-wal.html#GUC-ARCHIVE-COMMAND">archive_command</a>)によるアーカイブは非常に簡単ですが、カスタムアーカイブモジュールはしばしば非常に堅牢でパフォーマンスが高いでしょう。
</p><p>
<span class="original">
When a custom <xref linkend="guc-archive-library"/> is configured, PostgreSQL
will submit completed WAL files to the module, and the server will avoid
recycling or removing these WAL files until the module indicates that the files
were successfully archived. It is ultimately up to the module to decide what
to do with each WAL file, but many recommendations are listed at
<xref linkend="backup-archiving-wal"/>.
</span>
カスタム<a class="xref" href="runtime-config-wal.html#GUC-ARCHIVE-LIBRARY">archive_library</a>が設定されている場合、PostgreSQLは完了したWALファイルをモジュールに送信します。
サーバは、モジュールがファイルが正常にアーカイブされたことを示すまで、これらのWALファイルの再利用や削除を回避します。
各WALファイルをどうするかは最終的にモジュール次第ですが、<a class="xref" href="continuous-archiving.html#BACKUP-ARCHIVING-WAL" title="25.3.1. WALアーカイブの設定">25.3.1</a>には多くの推奨事項が記載されています。
</p><p>
<span class="original">
Archiving modules must at least consist of an initialization function (see
<xref linkend="archive-module-init"/>) and the required callbacks (see
<xref linkend="archive-module-callbacks"/>). However, archive modules are
also permitted to do much more (e.g., declare GUCs and register background
workers).
</span>
アーカイブモジュールは、少なくとも初期化関数(<a class="xref" href="archive-module-init.html" title="49.1. 初期化関数">49.1</a>を参照)と必要なコールバック(<a class="xref" href="archive-module-callbacks.html" title="49.2. アーカイブモジュールコールバック">49.2</a>を参照)で構成されている必要があります。
しかし、アーカイブモジュールはさらに多くのこと(GUCの宣言やバックグラウンドワーカーの登録など)も許可されています。
</p><p>
<span class="original">
The <filename>contrib/basic_archive</filename> module contains a working
example, which demonstrates some useful techniques.
</span>
<code class="filename">contrib/basic_archive</code>モジュールには、いくつかの有用なテクニックを示す実用的な例が含まれています。
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="replication-origins.html" title="第48章 レプリケーション進捗の追跡">前へ</a> </td><td width="20%" align="center"><a accesskey="u" href="server-programming.html" title="パート V. サーバプログラミング">上へ</a></td><td width="40%" align="right"> <a accesskey="n" href="archive-module-init.html" title="49.1. 初期化関数">次へ</a></td></tr><tr><td width="40%" align="left" valign="top">第48章 レプリケーション進捗の追跡 </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.3文書">ホーム</a></td><td width="40%" align="right" valign="top"> 49.1. 初期化関数</td></tr></table></div></body></html>