Re: PITR Recovery Question

From: "Gnanakumar" <gnanam(at)zoniac(dot)com>
To: "'Florian Pflug'" <fgp(at)phlo(dot)org>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: PITR Recovery Question
Date: 2010-06-05 07:05:37
Message-ID: 00cc01cb047d$82079830$8616c890$@com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

Hi Florian,

Thanks for your valuable suggestion and a detailed step on common way to use
PITR. Things are very clear now except that I've some other question in
connection to this.

> The correct way to clean out pg_xlog therefore is to either disable WAL
archiving, or to make sure your archive_command succeeds eventually.

Probably I would go with the 2nd option, that is allowing archive command to
run successfully until things are completely clear.

But this question is for my understanding: In case if I decide to go with
1st option, that is disable WAL archiving for a while, will it completely
clean out files from pg_xlog/ and pg_xlog/archive_status/ directories, so
that I can start the PITR by taking base backup by enabling WAL archiving
later?

> A common way to use PITR is the following.

> 4) You remove all WAL segments that predate the remaining base backups.
For that, you find the backup history file in the archive directory that
corresponds to the oldest remaining base backup and then remove all WAL
segments whose name is numerically smaller than the <number1> from that
backup history file. Keeping older WAL segments buys you nothing - WAL files
without a base backup that *predates* them are worthless.

Can you share with me any automated shell script that takes care of this
removal automatically? Or can you share any systematic way (steps) of doing
things if I want to do this manually?

Regards,
Gnanam

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Manohar Bhattarai 2010-06-05 11:34:07 Re: Exception while accessing database
Previous Message Gnanakumar 2010-06-05 05:21:16 Re: PITR Recovery Question

Browse pgsql-hackers by date

  From Date Subject
Next Message Randy Solomonson 2010-06-05 12:16:58 How to get permission to debug postgres?
Previous Message Gnanakumar 2010-06-05 05:21:16 Re: PITR Recovery Question