
> OK, so you do a tar backup of a file.  While you are doing the tar,
> certain 8k blocks are being modified in the file.  There is no way to
> know what blocks are modified as you are doing the tar, and in fact you
> could read partial page writes during the tar.

No, I think all OS's (Unix and NT at least) guard against this, as long as 
the whole 8k block is written in one call. It is only the physical layer (disk) 
that is prone to partial writes.

> any page that was modified while we were backing up is in the WAL.  On
> restore, we can recover whatever tar saw of the file, knowing that the
> WAL page images will recover any page changes made during the tar.

Assuming above, I do not think this is necessary.

> What I suggest is a way for the backup tar to turn on pre-change page
> images while the tar is happening, and turn it off after the tar is
> done.

Again, I do not think this is necessary.

Andreas



Mon, 8 Jul 2002 14:15:02 +0200
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: Issues Outstanding for Point In Time Recovery (PITR)
Zeugswetter Andreas SB SD wrote:
> 
> > OK, so you do a tar backup of a file.  While you are doing the tar,
> > certain 8k blocks are being modified in the file.  There is no way to
> > know what blocks are modified as you are doing the tar, and in fact you
> > could read partial page writes during the tar.
> 
> No, I think all OS's (Unix and NT at least) guard against this, as long as 
> the whole 8k block is written in one call. It is only the physical layer (disk) 
> that is prone to partial writes.

Yes, good point.  The kernel will present a unified view of the 8k
block.  Of course, there are still cases where 8k blocks are being
changed in front/behind in the tarred file.  Will WAL allow us to
re-synchronize that file even if part of it has pages from an earlier in
time than other pages.  Uh, I think so.  So maybe we don't need the
pre-write images in WAL after all.  Can we replay the WAL when some
pages in the restored file _have_ the WAL changes and some don't?  Maybe
the LSN on the pages helps with this.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



Mon, 8 Jul 2002 12:51:13 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Issues Outstanding for Point In Time Recovery (PITR)