Skip to content

Commit afe8ac2

Browse files
committed
Document how pglesslog can be used to reduce the storage requirements of PITR.
1 parent 8ebe1e3 commit afe8ac2

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

doc/src/sgml/backup.sgml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.121 2008/11/09 17:51:15 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.122 2009/01/13 00:54:11 momjian Exp $ -->
22

33
<chapter id="backup">
44
<title>Backup and Restore</title>
@@ -1337,6 +1337,23 @@ tar -rf /var/lib/pgsql/backup.tar /var/lib/pgsql/archive/
13371337
WAL files are part of the same <application>tar</> file.
13381338
Please remember to add error handling to your backup scripts.
13391339
</para>
1340+
1341+
<para>
1342+
If archive storage size is a concern, use <application>pg_compresslog</>,
1343+
<ulink url="http://pglesslog.projects.postgresql.org"></ulink>, to
1344+
remove unnecessary <xref linkend="guc-full-page-writes"> and trailing
1345+
space from the WAL files. You can then use
1346+
<application>gzip</application> to further compress the output of
1347+
<application>pg_compresslog</>:
1348+
<programlisting>
1349+
archive_command = 'pg_compresslog %p - | gzip &gt; /var/lib/pgsql/archive/%f'
1350+
</programlisting>
1351+
You will then need to use <application>gunzip</> and
1352+
<application>pg_decompresslog</> during recovery:
1353+
<programlisting>
1354+
restore_command = 'gunzip &lt; /mnt/server/archivedir/%f | pg_decompresslog - %p'
1355+
</programlisting>
1356+
</para>
13401357
</sect3>
13411358

13421359
<sect3 id="backup-scripts">

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy