Re: Documentation on PITR still scarce

From: Joachim Wieland <joe(at)mcknight(dot)de>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Documentation on PITR still scarce
Date: 2004-11-06 00:54:26
Message-ID: 20041106005426.GA17587@mcknight.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Fri, Nov 05, 2004 at 10:26:55PM +0000, Simon Riggs wrote:
> That is exactly the situation Timelines are designed to avoid. This
> should not have happened. What leads you to think it has? My guess is
> that it has not. If it has, its a bug.

Hmm. I did the following:

- I recovered to one PIT.
- I verified that everything was fine.
- If I shut down postmaster now and try to recover to another PIT,
everything will work fine. (by re-restoring the original backup as you
pointed out)

However if I:

- Shut down postmaster and restart it in normal mode (without a new
recovery.conf) and then do some database operations, it seems to
overwrite a file from my archive:

[...recovery...]
LOG: archive recovery complete
LOG: database system is ready
LOG: archived transaction log file "00000002.history"

Now we are at timeline 2 I guess.

[...normal startup...]
LOG: checkpoint record is at 0/22701F8
LOG: redo record is at 0/22701F8; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 2595; next OID: 231915
LOG: database system is ready
[...I do some database action...]
LOG: archived transaction log file "000000010000000000000001"
LOG: archived transaction log file "000000020000000000000002"

If I stop postmaster again, wipe out my data/ dir and re-restore the
original backup, I can't do any PITRs any more... If I re-install my archive
as well, it works again.

> > My question is: When I've restored up to the time t_0, how can I go on
> > to restore up to another point in time, later than t_0 but before the
> > end of my log files.

> You need to re-restore the original backup.

Ah. Ok. I had the impression that the timelines save me from re-restoring
the original files and that I could start off directly from there. Ok,
that's why it didn't work out that well ;-)

Thanks,
Joachim

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-11-06 01:03:41 Re: [PATCHES] CVS should die
Previous Message Markus Bertheau 2004-11-06 00:17:59 Re: [PATCHES] CVS should die