-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive-module-callbacks.html
More file actions
78 lines (73 loc) · 7.86 KB
/
Copy patharchive-module-callbacks.html
File metadata and controls
78 lines (73 loc) · 7.86 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
<?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>51.2. Archive Module Callbacks</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="archive-module-init.html" title="51.1. Initialization Functions" /><link rel="next" href="reference.html" title="パート VI. リファレンス" /><meta name="viewport" content="width=device-width,initial-scale=1.0" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="4" align="center"><a accesskey="h" href="index.html">PostgreSQL 15rc2文書</a></th></tr><tr><td width="10%" align="left"></td><td width="10%" align="left"></td><td width="60%" align="center"><a href="archive-modules.html" title="第51章 Archive Modules">第51章 Archive Modules</a></td><td width="20%" align="right"></td></tr><tr><td width="10%" align="left"><a accesskey="p" href="archive-module-init.html" title="51.1. Initialization Functions">前へ</a> </td><td width="10%" align="left"><a accesskey="u" href="archive-modules.html" title="第51章 Archive Modules">上へ</a></td><td width="60%" align="center">51.2. Archive Module Callbacks</td><td width="20%" align="right"> <a accesskey="n" href="reference.html" title="パート VI. リファレンス">次へ</a></td></tr></table><hr /></div><div class="sect1" id="ARCHIVE-MODULE-CALLBACKS"><div class="titlepage"><div><div><h2 class="title" style="clear: both">51.2. Archive Module Callbacks</h2></div></div></div><p>
<!--
The archive callbacks define the actual archiving behavior of the module.
The server will call them as required to process each individual WAL file.
-->
《機械翻訳》アーカイブコールバックは、モジュールの実際のアーカイブ動作を定義します。
サーバは、個々のWALファイルを処理するために必要に応じてこれらを呼び出します。
</p><div class="sect2" id="ARCHIVE-MODULE-CHECK"><div class="titlepage"><div><div><h3 class="title">51.2.1. Check Callback</h3></div></div></div><p>
<!--
The <function>check_configured_cb</function> callback is called to determine
whether the module is fully configured and ready to accept WAL files (e.g.,
its configuration parameters are set to valid values). If no
<function>check_configured_cb</function> is defined, the server always
assumes the module is configured.
-->
《機械翻訳》<code class="function">check_configured_cb</code>コールバックは、モジュールが完全に設定されていて、WALファイルを受け入れる準備ができているかどうかを判断するために呼び出されます。
<code class="function">check_configured_cb</code>が定義されていない場合、サーバは常にモジュールが設定されていると想定します。
</p><pre class="programlisting">
typedef bool (*ArchiveCheckConfiguredCB) (void);
</pre><p>
<!--
If <literal>true</literal> is returned, the server will proceed with
archiving the file by calling the <function>archive_file_cb</function>
callback. If <literal>false</literal> is returned, archiving will not
proceed, and the archiver will emit the following message to the server log:
-->
《機械翻訳》<code class="literal">true</code>が返された場合、サーバは<code class="function">archive_file_cb</code>コールバックを呼び出してファイルのアーカイブを続行します。
<code class="literal">false</code>が返された場合、アーカイブは続行されず、アーカイバはサーバログに次のメッセージを出力します:
</p><pre class="screen">
WARNING: archive_mode enabled, yet archiving is not configured
</pre><p>
<!--
In the latter case, the server will periodically call this function, and
archiving will proceed only when it returns <literal>true</literal>.
-->
《機械翻訳》後者の場合、サーバは定期的にこの関数を呼び出し、<code class="literal">true</code>が返された場合のみアーカイブが続行されます。
</p></div><div class="sect2" id="ARCHIVE-MODULE-ARCHIVE"><div class="titlepage"><div><div><h3 class="title">51.2.2. Archive Callback</h3></div></div></div><p>
<!--
The <function>archive_file_cb</function> callback is called to archive a
single WAL file.
-->
《機械翻訳》<code class="function">archive_file_cb</code>コールバックは、単一のWALファイルをアーカイブするために呼び出されます。
</p><pre class="programlisting">
typedef bool (*ArchiveFileCB) (const char *file, const char *path);
</pre><p>
<!--
If <literal>true</literal> is returned, the server proceeds as if the file
was successfully archived, which may include recycling or removing the
original WAL file. If <literal>false</literal> is returned, the server will
keep the original WAL file and retry archiving later.
<replaceable>file</replaceable> will contain just the file name of the WAL
file to archive, while <replaceable>path</replaceable> contains the full
path of the WAL file (including the file name).
-->
《機械翻訳》<code class="literal">true</code>が返された場合、サーバはファイルが正常にアーカイブされたかのように処理を進めます。
これには元のWALファイルのリサイクルまたは削除が含まれる場合があります。
<code class="literal">false</code>が返された場合、サーバは元のWALファイルを保持し、後でアーカイブを再試行します。
<em class="replaceable"><code>file</code></em>にはアーカイブするWALファイルのファイル名だけが含まれ、<em class="replaceable"><code>path</code></em>にはWALファイルのフルパス(ファイル名を含む)が含まれます。
</p></div><div class="sect2" id="ARCHIVE-MODULE-SHUTDOWN"><div class="titlepage"><div><div><h3 class="title">51.2.3. Shutdown Callback</h3></div></div></div><p>
<!--
The <function>shutdown_cb</function> callback is called when the archiver
process exits (e.g., after an error) or the value of
<xref linkend="guc-archive-library"/> changes. If no
<function>shutdown_cb</function> is defined, no special action is taken in
these situations.
-->
《機械翻訳》<code class="function">shutdown_cb</code>コールバックは、アーカイバプロセスが終了したとき(エラー後など)、または<a class="xref" href="runtime-config-wal.html#GUC-ARCHIVE-LIBRARY">archive_library</a>の値が変更されたときに呼び出されます。
<code class="function">shutdown_cb</code>が定義されていない場合、このような状況では特別な処理は行われません。
</p><pre class="programlisting">
typedef void (*ArchiveShutdownCB) (void);
</pre><p>
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="archive-module-init.html" title="51.1. Initialization Functions">前へ</a> </td><td width="20%" align="center"><a accesskey="u" href="archive-modules.html" title="第51章 Archive Modules">上へ</a></td><td width="40%" align="right"> <a accesskey="n" href="reference.html" title="パート VI. リファレンス">次へ</a></td></tr><tr><td width="40%" align="left" valign="top">51.1. Initialization Functions </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 15rc2文書">ホーム</a></td><td width="40%" align="right" valign="top"> パート VI. リファレンス</td></tr></table></div></body></html>