Re: PITR bad restore possibility? - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: PITR bad restore possibility?
Date
Msg-id 1114648854.14522.66.camel@home
Whole thread Raw
In response to Re: PITR bad restore possibility?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 2005-04-27 at 20:14 -0400, Tom Lane wrote:
> Rod Taylor <pg@rbt.ca> writes:
> > 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?
> 
> You're screwed ... just like if you lost part of the snapshot itself.
> 
> If you're really lucky the missing WAL logs don't contain any data
> that's not in the snapshot, but I sure wouldn't trust it.

I realize that data would be lost from the point the logs cut off, but
is there any chance of database corruption because the snapshot contains
transaction IDs in tables but possibly not a complete pg_clog or
pg_subtrans directory or vice-versa (pg_clog is complete, but heap files
wouldn't be)?

If WALs cut off at transaction 10, and heaps contain up to transaction
20, WAL makes sure pg_clog is updated to 10 but would a commit from
transaction 11 through 20 make the heap data visible again even though
it wasn't fully restored from WAL?

PostgreSQL doesn't seem to complain if the WAL records cut off before
the PIT that the pg_stop_transaction() was called at during the restore
process, but I'm not entirely sure if it is a corrupt restore (and we
need to go back to an older snapshot and start over playing up until the
WAL records cut off) or whether it's a usable restore ready for
production use.

-- 



pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Developer Community
Next
From: Juan Jose Costello Levien
Date:
Subject: Re: Developer Community