On Wed, 2004-06-30 at 12:27, ohp@pyrenet.fr wrote:
Given that log files will be archieved, how can we purge them (ie know for
sure we won't need them anymore)
Good question - you're right I've not mentioned that.

The answer is straightforward. Whenever you do a backup, one of the
transaction logs will be the current one. That means any logs before the
earliest one you can see can now be purged from the archive.

So if you can see: 137,138,139 then that means anything at 136 or before
is able to be discarded.

However, I'd recommend keeping more than just one backup, usually 2 or
3, so the actual purge point is dependant upon your data retention
strategy, possibly linked to tape rotation etc..
if I do a backup of the DATA dir, then obviously I won't need the logs
that were taken before. I can't just delete them all because maybe a few
will be archived during the backup.
Taking a full physical backup will normally need to exclude the pg_xlog
directory, or at least the current xlog. Since it is being written to
very regularly it is almost impossible to take a clean copy using
standard utilities - though filesystem level utilities work fine.

Best regards, Simon Riggs

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 8 | next ›
Discussion Overview
grouppgsql-patches @
postedJun 28, '04 at 8:59p
activeJul 2, '04 at 7:27a

2 users in discussion

Simon Riggs: 6 posts Ohp: 2 posts



site design / logo © 2021 Grokbase