Re: PITR Recovery Question

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <pgsql-admin(at)postgresql(dot)org>,<gnanam(at)zoniac(dot)com>
Cc: <fgp(at)phlo(dot)org>
Subject: Re: PITR Recovery Question
Date: 2010-06-05 14:08:41
Message-ID: 4C0A141A0200002500032037@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Gnanakumar" wrote:

> I couldn't able to get this particular step clearly: "One trick
> would be to temporarily change your archive_command to 'true',
> delete all files from your archive, and then change the command
> back ". Can you please clarify and explain on this?

Based on other statements you've made, this isn't a trick you want to
use; just make space in the archive directory, let archiving catch
up, and then take a fresh base backup.

That said, this trick is a way to tell PostgreSQL the archive was
successful, even though it wasn't actually copied. This is
occassionally a useful trick to clear out a backlog of WAL files very
quickly, at the cost of creating a gap in your WAL archive. Your OS
likely has an executable and/or a shell builtin named "true" which
does nothing except return the "success" exit code of zero. If you
have such a command on your OS and you set your archive command to
that, PostgreSQL will blast through cleaning up old WAL files.

kevin(at)kevin-desktop:~$ true
kevin(at)kevin-desktop:~$ echo $?
0

But since you said you can copy off the contents of your archive
directory and delete to make room, that's clearly the way to go.

-Kevin

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Anj Adu 2010-06-05 14:19:51 Re: Strange performance issue apparently causd by pg_stat timeout
Previous Message Manohar Bhattarai 2010-06-05 11:34:07 Re: Exception while accessing database