Re: Magic? Or good design?
Posted in 1998
Neil Truby wrote: > > Let's assume I'm backing up a large database server with a level 0 > archive, which will take 2 hours. I kick off the archive at 0400. The > pages that make up the instance are therefore being copied to the > archive tape at anything from 0 to 120 minutes after the start of the > archive. My users continue to update the server while the archive > progresses. The last pages are therefore copied some two hours after the > start of the archive, and may have undergone many updates in that time. > > If I then perform a restore, all pages in the database server will on > completion be in the state they were at 0400, even though they may not > actually have been copied to the tape for two hours after that. In 5.xx the description that Jonathan Leffler and Scott Black give is just about right, and indeed if the tape needs changing or is hung the checkpoint will wait for the tape change to complete. However, this was changed in 7.xx. Actually, the physical log pages are copied into a set of temp tables, one per dbspace being backed up, at each checkpoint, before the physical log is cleared. When the archive thread completes a dbspace it copies all of the preimage pages from the corresponding temp table out to the tape. This prevents the archive from stopping the checkpoint except momentarily if a tape change is needed, and is also why IDS 7.x uses DBSPACETEMP space during archives. This change is one main reason that 7.xx archives run much faster than 5.xx archives did. Art S. Kagel