summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2009-01-13 00:54:11 +0000
committerBruce Momjian2009-01-13 00:54:11 +0000
commitcdcd0d18ad5e2386a502be1442ebdbe088d61493 (patch)
treee2f5fe56ebef7d9a5f3a03bc3de6dd1a14661189
parentc1a88a2e8590e0915cc735e4f0855105b0dfef19 (diff)
Document how pglesslog can be used to reduce the storage requirements of PITR.
-rw-r--r--doc/src/sgml/backup.sgml17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index f04d487251..fb52b50019 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -1337,6 +1337,23 @@ tar -rf /var/lib/pgsql/backup.tar /var/lib/pgsql/archive/
WAL files are part of the same <application>tar</> file.
Please remember to add error handling to your backup scripts.
</para>
+
+ <para>
+ If archive storage size is a concern, use <application>pg_compresslog</>,
+ <ulink url="http://pglesslog.projects.postgresql.org"></ulink>, to
+ remove unnecessary <xref linkend="guc-full-page-writes"> and trailing
+ space from the WAL files. You can then use
+ <application>gzip</application> to further compress the output of
+ <application>pg_compresslog</>:
+<programlisting>
+archive_command = 'pg_compresslog %p - | gzip &gt; /var/lib/pgsql/archive/%f'
+</programlisting>
+ You will then need to use <application>gunzip</> and
+ <application>pg_decompresslog</> during recovery:
+<programlisting>
+restore_command = 'gunzip &lt; /mnt/server/archivedir/%f | pg_decompresslog - %p'
+</programlisting>
+ </para>
</sect3>
<sect3 id="backup-scripts">