Re: pg_xlog volume question

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: pg_xlog volume question
Дата
Msg-id 498C2C63.EE98.0025.0@wicourts.gov
обсуждение исходный текст
Ответ на pg_xlog volume question  ("Mark Steben" <msteben@autorevenue.com>)
Список 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 по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: pg_xlog volume question
Следующее
От: "Mark Steben"
Дата:
Сообщение: Re: pg_xlog volume question