PITR bad restore possibility? - Mailing list pgsql-hackers

From Rod Taylor
Subject PITR bad restore possibility?
Date
Msg-id 1114641855.14522.40.camel@home
Whole thread Raw
Responses Re: PITR bad restore possibility?
List pgsql-hackers
What happens if for reasons of broken tape, disk, etc. you lose some of
your WAL logs which happens to correspond to the middle of the snapshot
backup?

The equivalent would be to:

1) Start the snapshot backup (tar)
2) Stop logging usable WAL logs (say a tape jammed or disk is corrupted)
3) Snapshot portion of the backup successfully completes

Later on you try replay the above snapshot backup while cursing the
partial data loss due to the tape jam or partially corrupt disk.

I believe the replay would have data in the data directory which is
newer and possibly contains partial transactions for data which was not
replayed by the WAL logs.

Would this be a usable database? How about when it eventually uses the
same transaction IDs as have already been used since WAL didn't get to
replay them all?

If not, is there a way to find out the last WAL segment required for the
snapshot backup to be usable?

-- 



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Tablepartitioning: Will it be supported in Future?
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] [WIP] shared locks