Re: Problem with PITR recovery

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Jeff Davis <jdavis-pgsql(at)empires(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problem with PITR recovery
Date: 2005-04-18 07:39:02
Message-ID: Pine.GSO.4.62.0504181135010.16872@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 18 Apr 2005, Bruce Momjian wrote:

> Jeff Davis wrote:
>>
>> I could still use a little clarification. It seems sort of like there is
>> an extra step, like:
>>
>> (1) start archiving
>> (2) pg_start_backup()
>> (3) copy PGDATA directory with tar
>> (4) pg_stop_backup()
>> (5) ??
>>
>> And the text you have at
>> http://candle.pha.pa.us/main/writings/pgsql/sgml/backup-online.html
>>
>> says: "To make use of this backup, you will need to keep around all the
>> WAL segment files generated during and after the file system backup.".
>>
>> How long after? Wouldn't you be keeping the WAL segments afterward
>> anyway by archiving?
>>
>> I've tested and been able to recover using PITR before, but I'd like a
>> little clarification on the steps to make absolutely sure that the base
>> backup I have is viable.
>>
>> Can you sort of run through the failure case again, and how to prevent
>> it?
>
> The failure case in the original docs is that you do your
> pg_stop_backup(), and then delete all the WAL file before the *.backup
> file that was just created. However, you do not have a valid tar backup
> until you have archived all the WAL files used from the *.backup WAL
> file up to the WAL file that was active at pg_stop_backup(), which is
> mentioned in the *.backup file. If you went and deleted your old WAL
> files anyway, without waiting for those other WAL files to be archived,
> and your disk drive crashed, you wouldn't have a tar backup you could
> use, and you had deleted the old WAL files you would have needed to
> recover your previous tar backup.
>
> Is there something in the current wording that needs clarification?

I'd say it's very not cool :) It's not we all expected from PITR.
I recall now Simon mentioned about that and have it in his TODO.
Other thing I don't understand what's the problem to generate WAL file
by demand ? Probably, TODO should says about this.

>
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message rafaqat ali 2005-04-18 08:26:42 How to get trigger oid by trigger name
Previous Message Heikki Linnakangas 2005-04-18 06:53:09 Re: Urgent