is it safe to clear oroginal xlog after archiving it?

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема is it safe to clear oroginal xlog after archiving it?
Дата
Msg-id 20090604124220.GA31943@depesz.com
обсуждение исходный текст
Ответы Re: is it safe to clear oroginal xlog after archiving it?  (Greg Smith <gsmith@gregsmith.com>)
Re: is it safe to clear oroginal xlog after archiving it?  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-general
hi,
i have archive_command which copies the wal segment someplace.

is it safe, if i would do:
dd if=/dev/zero of=$ORIGINAL_XLOG_SEGMENT bs=1M count=16
before returning from archive_command script?

the point of doing so is pretty simple: i have a system with rather low
traffic, so i use archive_timeout. and most of the xlog segments are
unused, but they contain previous data, since the files are reused.

if zero-ing the files was safe, i could compress them more effectively.

i am aware that there is pg_lesslog or clearxlogtail, but if this
zeroing would be ok, then i'd rather use it (one less program to worry
about, and it looks safer because i modify file that will be overwritten
anyway).

Best regards,

depesz

--
Linkedin: http://www.linkedin.com/in/depesz  /  blog: http://www.depesz.com/
jid/gtalk: depesz@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007

В списке pgsql-general по дате отправления:

Предыдущее
От: "Carlos Oliva"
Дата:
Сообщение: Re: Upgrading Database: need to dump and restore?
Следующее
От: Grzegorz Jaśkiewicz
Дата:
Сообщение: Re: Upgrading Database: need to dump and restore?