pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gnanakumar <gnanam@zoniac.com>
To: 'Kevin Grittner' <Kevin.Grittner@wicourts.gov>
To: pgsql-admin@postgresql.org
Cc: fgp@phlo.org
Subject: Re: PITR Recovery Question
Date: Sat, 5 Jun 2010 10:51:16 +0530
Message-ID: <00cb01cb046e$ee54f550$cafedff0$@com> (raw)
In-Reply-To: <4C08CF4D0200002500031F44@gw.wicourts.gov>
References: <001201cb0321$df429d40$9dc7d7c0$@com>
	<00ca01cb03dc$a9ffe780$fdffb680$@com>
	<4C08CF4D0200002500031F44@gw.wicourts.gov>

Hi Kevin,

> It is generally unsafe to delete any WAL files from pg_xlog.  If
> they are there because your archive command has been failing, you
> need to turn off archiving or (probably more convenient) allow the
> archive script to return success until things clear.  One trick
> would be to temporarily change your archive_command to 'true',
> delete all files from your archive, and then change the command
> back.  Doing that without exposing yourself to a period where you
> have no backup might be tricky, though.

I'm trying to see and understand your view point, but 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?

When you say *temporarily changing archive_command to 'true' *, do you mean
enabling/disabling of WAL archiving here?  Per documentation, "If this is an
empty string (the default), WAL archiving is disabled.".  And when you say
"change the command back", I understood it as *disabling*.  Is my
understanding correct?

> If the only problem with the archive command is that the archive fs
> is full, I would copy the contents of the archive directory to tape
> or whatever medium you have for long-term storage, delete the
> contents, and let archive succeed.  The pg_xlog directory will
> eventually clear, and then I would get a fresh PITR base backup
> (following all the documented steps for doing so).  You really want
> to see WAL files flowing to your archive location before you start
> the process of getting a new base backup.

Yes, probably I should go ahead and proceed as you suggested above, that is
allowing archive script to run successfully until things are completely
clear.
 
> If there's some other reason that the archive command has been
> failing, what is it?
 
No other reason.  It was failing only because my WAL archive drive was full.

Regards,
Gnanam




view thread (15+ messages)  latest in thread

Message-ID: <00cb01cb046e$ee54f550$cafedff0$@com>
Permalink:  ../00cb01cb046e$ee54f550$cafedff0$@com/
Also on:    postgresql.org/message-id/00cb01cb046e$ee54f550$cafedff0$@com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: gnanam@zoniac.com, Kevin.Grittner@wicourts.gov, fgp@phlo.org
  Subject: Re: PITR Recovery Question
  In-Reply-To: <00cb01cb046e$ee54f550$cafedff0$@com>

* 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