]> begriffs open source - ai-pg/blob - full-docs/html/basic-archive.html
Include latest toc output
[ai-pg] / full-docs / html / basic-archive.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!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>F.5. basic_archive — an example WAL archive module</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="basebackup-to-shell.html" title="F.4. basebackup_to_shell — example &quot;shell&quot; pg_basebackup module" /><link rel="next" href="bloom.html" title="F.6. bloom — bloom filter index access method" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">F.5. basic_archive — an example WAL archive module</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="basebackup-to-shell.html" title="F.4. basebackup_to_shell — example &quot;shell&quot; pg_basebackup module">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="contrib.html" title="Appendix F. Additional Supplied Modules and Extensions">Up</a></td><th width="60%" align="center">Appendix F. Additional Supplied Modules and Extensions</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="bloom.html" title="F.6. bloom — bloom filter index access method">Next</a></td></tr></table><hr /></div><div class="sect1" id="BASIC-ARCHIVE"><div class="titlepage"><div><div><h2 class="title" style="clear: both">F.5. basic_archive — an example WAL archive module <a href="#BASIC-ARCHIVE" class="id_link">#</a></h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="basic-archive.html#BASIC-ARCHIVE-CONFIGURATION-PARAMETERS">F.5.1. Configuration Parameters</a></span></dt><dt><span class="sect2"><a href="basic-archive.html#BASIC-ARCHIVE-NOTES">F.5.2. Notes</a></span></dt><dt><span class="sect2"><a href="basic-archive.html#BASIC-ARCHIVE-AUTHOR">F.5.3. Author</a></span></dt></dl></div><a id="id-1.11.7.15.2" class="indexterm"></a><p>
3   <code class="filename">basic_archive</code> is an example of an archive module.  This
4   module copies completed WAL segment files to the specified directory.  This
5   may not be especially useful, but it can serve as a starting point for
6   developing your own archive module.  For more information about archive
7   modules, see <a class="xref" href="archive-modules.html" title="Chapter 49. Archive Modules">Chapter 49</a>.
8  </p><p>
9   In order to function, this module must be loaded via
10   <a class="xref" href="runtime-config-wal.html#GUC-ARCHIVE-LIBRARY">archive_library</a>, and <a class="xref" href="runtime-config-wal.html#GUC-ARCHIVE-MODE">archive_mode</a>
11   must be enabled.
12  </p><div class="sect2" id="BASIC-ARCHIVE-CONFIGURATION-PARAMETERS"><div class="titlepage"><div><div><h3 class="title">F.5.1. Configuration Parameters <a href="#BASIC-ARCHIVE-CONFIGURATION-PARAMETERS" class="id_link">#</a></h3></div></div></div><div class="variablelist"><dl class="variablelist"><dt><span class="term">
13      <code class="varname">basic_archive.archive_directory</code> (<code class="type">string</code>)
14      <a id="id-1.11.7.15.5.2.1.1.3" class="indexterm"></a>
15     </span></dt><dd><p>
16       The directory where the server should copy WAL segment files.  This
17       directory must already exist.  The default is an empty string, which
18       effectively halts WAL archiving, but if <a class="xref" href="runtime-config-wal.html#GUC-ARCHIVE-MODE">archive_mode</a>
19       is enabled, the server will accumulate WAL segment files in the
20       expectation that a value will soon be provided.
21      </p></dd></dl></div><p>
22    These parameters must be set in <code class="filename">postgresql.conf</code>.
23    Typical usage might be:
24   </p><pre class="programlisting">
25 # postgresql.conf
26 archive_mode = 'on'
27 archive_library = 'basic_archive'
28 basic_archive.archive_directory = '/path/to/archive/directory'
29 </pre></div><div class="sect2" id="BASIC-ARCHIVE-NOTES"><div class="titlepage"><div><div><h3 class="title">F.5.2. Notes <a href="#BASIC-ARCHIVE-NOTES" class="id_link">#</a></h3></div></div></div><p>
30    Server crashes may leave temporary files with the prefix
31    <code class="filename">archtemp</code> in the archive directory.  It is recommended to
32    delete such files before restarting the server after a crash.  It is safe to
33    remove such files while the server is running as long as they are unrelated
34    to any archiving still in progress, but users should use extra caution when
35    doing so.
36   </p></div><div class="sect2" id="BASIC-ARCHIVE-AUTHOR"><div class="titlepage"><div><div><h3 class="title">F.5.3. Author <a href="#BASIC-ARCHIVE-AUTHOR" class="id_link">#</a></h3></div></div></div><p>
37    Nathan Bossart
38   </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="basebackup-to-shell.html" title="F.4. basebackup_to_shell — example &quot;shell&quot; pg_basebackup module">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="contrib.html" title="Appendix F. Additional Supplied Modules and Extensions">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bloom.html" title="F.6. bloom — bloom filter index access method">Next</a></td></tr><tr><td width="40%" align="left" valign="top">F.4. basebackup_to_shell — example "shell" pg_basebackup module </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="40%" align="right" valign="top"> F.6. bloom — bloom filter index access method</td></tr></table></div></body></html>