Re: archive_command

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Jeff Frost <jeff(at)frostconsultingllc(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: archive_command
Date: 2005-10-04 16:09:55
Message-ID: 1128442195.8603.324.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, 2005-10-04 at 08:03 -0700, Jeff Frost wrote:
> >> Is there any possible way to replay the other WAL files after the Sep 21
> >> switchover/switchback? I'm going to guess this is similar to having another
> >> timeline.
> >
> > That may be your exact case, it depends upon how you did recovery. Both
> > systems think they are the same one, so you need to be careful.
> >
> > Look for the last log file of the went-down node. That file should exist
> > twice, once as finally written by the went-down node and once as
> > continued to be written to by the stayed-up node after switchover. It
> > sounds like the wrong file was used to recover with and as a result
> > stopped recovery on Sep 21. But if you're running with the system now,
> > you'll need to do an intermediate rebuild and recover the data manually.
>
> What would constitute an intermediate rebuild? Of course the system is up and
> live and having data added to it. How would one restore from multiple
> timelines?

This is only if you are back up and working on the went-down box:

intermediate rebuild: I mean that you will have to restore the data from
the period of switchover, manually extract the relevant data with SQL
and then re-insert those changes yourself and resolve conflicts.

There isn't a process to merge the two log streams. The same txnid will
have been used on both servers to refer to separate transactions, so
there can be no automated way of resolving the data. It has to be done
using business domain knowledge rather than log data.

All of that's no different from any other RDBMS, as I'm sure you know.

Best Regards, Simon Riggs

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Gaetano Mendola 2005-10-04 16:14:58 Re: Altering WAL Segment File Size
Previous Message Sidar López Cruz 2005-10-04 16:01:42 FW: truncate error