-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchive-modules.html
More file actions
24 lines (24 loc) · 5.09 KB
/
Copy patharchive-modules.html
File metadata and controls
24 lines (24 loc) · 5.09 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
<?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章 Archive Modules</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="第50章 レプリケーション進捗の追跡" /><link rel="next" href="archive-module-init.html" title="51.1. Initialization Functions" /><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 15beta3文書</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"></td></tr><tr><td width="10%" align="left"><a accesskey="p" href="replication-origins.html" title="第50章 レプリケーション進捗の追跡">前へ</a> </td><td width="10%" align="left"><a accesskey="u" href="server-programming.html" title="パート V. サーバプログラミング">上へ</a></td><td width="60%" align="center">第51章 Archive Modules</td><td width="20%" align="right"> <a accesskey="n" href="archive-module-init.html" title="51.1. Initialization Functions">次へ</a></td></tr></table><hr /></div><div class="chapter" id="ARCHIVE-MODULES"><div class="titlepage"><div><div><h2 class="title">第51章 Archive Modules</h2></div></div></div><div class="toc"><p><strong>目次</strong></p><dl class="toc"><dt><span class="sect1"><a href="archive-module-init.html">51.1. Initialization Functions</a></span></dt><dt><span class="sect1"><a href="archive-module-callbacks.html">51.2. Archive Module Callbacks</a></span></dt><dd><dl><dt><span class="sect2"><a href="archive-module-callbacks.html#ARCHIVE-MODULE-CHECK">51.2.1. Check Callback</a></span></dt><dt><span class="sect2"><a href="archive-module-callbacks.html#ARCHIVE-MODULE-ARCHIVE">51.2.2. Archive Callback</a></span></dt><dt><span class="sect2"><a href="archive-module-callbacks.html#ARCHIVE-MODULE-SHUTDOWN">51.2.3. Shutdown Callback</a></span></dt></dl></dd></dl></div><a id="id-1.8.16.2" class="indexterm"></a><p>
PostgreSQL provides infrastructure to create custom modules for continuous
archiving (see <a class="xref" href="continuous-archiving.html" title="26.3. 継続的アーカイブとポイントインタイムリカバリ(PITR)">26.3</a>). While archiving via
a shell command (i.e., <a class="xref" href="runtime-config-wal.html#GUC-ARCHIVE-COMMAND">archive_command</a>) is much
simpler, a custom archive module will often be considerably more robust and
performant.
</p><p>
When a custom <a class="xref" href="runtime-config-wal.html#GUC-ARCHIVE-LIBRARY">archive_library</a> 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
<a class="xref" href="continuous-archiving.html#BACKUP-ARCHIVING-WAL" title="26.3.1. WALアーカイブの設定">26.3.1</a>.
</p><p>
Archiving modules must at least consist of an initialization function (see
<a class="xref" href="archive-module-init.html" title="51.1. Initialization Functions">51.1</a>) and the required callbacks (see
<a class="xref" href="archive-module-callbacks.html" title="51.2. Archive Module Callbacks">51.2</a>). However, archive modules are
also permitted to do much more (e.g., declare GUCs and register background
workers).
</p><p>
The <code class="filename">contrib/basic_archive</code> module contains a working
example, which demonstrates some useful techniques.
</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="第50章 レプリケーション進捗の追跡">前へ</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="51.1. Initialization Functions">次へ</a></td></tr><tr><td width="40%" align="left" valign="top">第50章 レプリケーション進捗の追跡 </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 15beta3文書">ホーム</a></td><td width="40%" align="right" valign="top"> 51.1. Initialization Functions</td></tr></table></div></body></html>