3
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4
<title>3.� Archive Logging Options </title>
5
<link rel="stylesheet" href="stylesheet.css" type="text/css">
6
<link rev="made" href="pgsql-docs@postgresql.org">
7
<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
8
<link rel="start" href="index.html" title="Slony-I HEAD_20060719 Documentation">
9
<link rel="up" href="runtime-config.html" title="Run-time Configuration">
10
<link rel="prev" href="slon-config-connection.html" title="2.�Connection settings">
11
<link rel="next" href="slon-config-interval.html" title="4.�Event Tuning">
12
<link rel="copyright" href="ln-legalnotice.html" title="Legal Notice">
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="sect1" lang="en">
15
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
16
<a name="slon-archive-logging"></a>3.� Archive Logging Options </h2></div></div></div>
17
<div class="variablelist"><dl>
19
<a name="slon-config-archive-dir"></a><span class="term"><code class="varname">archive_dir</code> (<code class="type">text</code>)</span>
21
<dd><p>This indicates in what directory sync archive files should be stored.
24
<a name="slon-config-command-on-logarchive"></a><span class="term"><code class="varname">command_on_logarchive</code> (<code class="type">text</code>)</span>
27
<p>This indicates a Unix command to be submitted each time
28
an archive log is successfully generated.
30
<p> The command will be passed one parameter, namely the
31
full pathname of the archive file. Thus, supposing we have
33
<p> <code class="command">command_on_logarchive = <code class="filename">/usr/local/bin/logstuff</code></code>
35
<p> <code class="command">archive_dir = <code class="filename">/var/log/slony1/archivelogs/payroll</code></code>
37
<p> A typical log file might be named something like
38
<code class="filename">/var/log/slony1/archivelogs/payroll/slony1_log_1_00000000000000000036.sql</code></p>
39
<p> The command run after that SYNC was generated would be: </p>
40
<p> <code class="command"><code class="filename">/usr/local/bin/logstuff</code> <code class="filename">/var/log/slony1/archivelogs/payroll/slony1_log_1_00000000000000000036.sql</code></code>
42
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
43
<h3 class="title">Warning</h3>
44
<p> Note that this is run via
45
<code class="function">system(const char *COMMAND)</code>; if the
46
program that is run takes five minutes to run, that will defer
47
the next <code class="command">SYNC</code> by five minutes. You
48
probably don't want the archiving command to do much
49
“<span class="quote">in-line</span>” work.</p>