Re: pg_xlog volume question

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Mark Steben" <msteben(at)autorevenue(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: pg_xlog volume question
Date: 2009-02-06 18:26:11
Message-ID: 498C2C63.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

>>> "Mark Steben" <msteben(at)autorevenue(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mark Steben 2009-02-06 18:29:11 Re: pg_xlog volume question
Previous Message Joshua D. Drake 2009-02-06 18:12:43 Re: pg_xlog volume question