Re: pg_xlog volume question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> "Mark Steben" <msteben@xxxxxxxxxxxxxxx> 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

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux