Re: pg_xlog volume question - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: pg_xlog volume question
Date
Msg-id 498C2C63.EE98.0025.0@wicourts.gov
Whole thread Raw
In response to pg_xlog volume question  ("Mark Steben" <msteben@autorevenue.com>)
List pgsql-admin
>>> "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

pgsql-admin by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: pg_xlog volume question
Next
From: "Mark Steben"
Date:
Subject: Re: pg_xlog volume question