From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Mark Steben <msteben@autorevenue.com>
To: pgsql-admin@postgresql.org
Subject: Re: pg_xlog volume question
Date: Fri, 06 Feb 2009 12:26:11 -0600
Message-ID: <498C2C63.EE98.0025.0@wicourts.gov> (raw)
In-Reply-To: <CE75C28AC2DF4C6B996F1F4B460B7E15@dei26g028534>
References: <CE75C28AC2DF4C6B996F1F4B460B7E15@dei26g028534>
>>> "Mark Steben" <msteben@autorevenue.com> wrote:
> currently creating about 2GB of logs every hour. Is there a config
> parameter to reduce the amount that Xlog takes up?
We pipe ours through gzip as part of our archive script. There was a
"gotcha", though -- an xlog is reused without clearing it first for
performance reasons, which meant that even an xlog which had
accumulated little or nothing could compress very poorly. I wrote
pg_clearxlogtail to help us with this, and have posted source on
pgfoundry. Just pipe through it before gzip and the unused portion is
set to very compressible zero bytes with no discernible performance
hit.
Someone else took a more aggressive approach with pglesslog, so you
may want to look at that. I haven't, because we have a solution
that's working well enough for us, but apparently it dives down into
the actual log records and strips some out which it determines are not
needed for PITR recovery, and I think it might truncate the file
rather than setting it to zeros.
If you're already using one of these and compressing the files, there
may not be much else you can do than to buy more drives.
-Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, msteben@autorevenue.com
Subject: Re: pg_xlog volume question
In-Reply-To: <498C2C63.EE98.0025.0@wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox