From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Renato Oliveira <renato.oliveira@grant.co.uk>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: archived WALL files question
Date: Thu, 15 Apr 2010 11:01:49 -0500
Message-ID: <4BC6F21D0200002500030956@gw.wicourts.gov> (raw)
In-Reply-To: <7965A9DCF12CC14984420BCC37B1608F25AC0B99AD@Elzar.grant.co.uk>
References: <7965A9DCF12CC14984420BCC37B1608F25AC0B99AD@Elzar.grant.co.uk>
Renato Oliveira <renato.oliveira@grant.co.uk> wrote:
> I was reading again the documentation... "The archive command
> should generally de designed to refuse to overwrite any
> pre-existing archive file." This means it will keep writing logs
> to the folder specified forever, and without an intervention, the
> media will run out of space.
Overwriting an existing file wouldn't help with that, since the
filenames keep changing. It might, for example, prevent
accidentally wiping out the WAL files from one database cluster with
WAL files from another by copying the postgresql.conf file and
neglecting to change the archive script.
> What do you guys do with regards to this situation, for example:
> How to you clean up the old archived logs?
We keep two weekly base backups and all the WAL files needed to
recover from the earlier of the two to present. We also keep an
archival copy of the first base backup of each month with just the
WAL files needed to start it. We delete WAL files when no longer
needed to support this retention policy. It's all pretty automatic
based on bash scripts run from cron jobs.
Of course, you'll want to tailor your strategy to your business
needs.
-Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, renato.oliveira@grant.co.uk
Subject: Re: archived WALL files question
In-Reply-To: <4BC6F21D0200002500030956@gw.wicourts.gov>
References: <7965A9DCF12CC14984420BCC37B1608F25AC0B99AD@Elzar.grant.co.uk> <4BC6F21D0200002500030956@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox