Re: is it safe to clear oroginal xlog after archiving it? - Mailing list pgsql-general

From Greg Smith
Subject Re: is it safe to clear oroginal xlog after archiving it?
Date
Msg-id alpine.GSO.2.01.0906040952570.2894@westnet.com
Whole thread Raw
In response to is it safe to clear oroginal xlog after archiving it?  (hubert depesz lubaczewski <depesz@depesz.com>)
List pgsql-general
On Thu, 4 Jun 2009, hubert depesz lubaczewski wrote:

> 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?

Nope.  At that point, the files are still needed for crash recovery on
that system.  There will be a future point where a checkpoint will note
the files aren't needed anymore, and at that point they'll be recycled
(renamed with a new id and used again) or deleted.  You can't change the
files until then though, and that time can be several minutes after
archive_command is called.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

pgsql-general by date:

Previous
From: Bill Moran
Date:
Subject: Re: Upgrading Database: need to dump and restore?
Next
From: Sam Mason
Date:
Subject: Re: Division by zero