Browse Prior Art Database

Recovery of Data Pages After Partial Page Writes

IP.com Disclosure Number: IPCOM000124012D
Original Publication Date: 1991-Aug-01
Included in the Prior Art Database: 2005-Apr-05

Publishing Venue

IBM

Related People

Bullock, GR: AUTHOR [+4]

Abstract

Disclosed is a method for reducing data-loss due to power failure during non-atomic writes to disk in a transaction management system using write-ahead logging protocol, in particular a method for reducing data-loss on user data tables via a utility that automatically recovers as much data as possible, while informing the database administrator of exactly which data were not recoverable.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 9% of the total text.

Recovery of Data Pages After Partial Page Writes

      Disclosed is a method for reducing data-loss due to
power failure during non-atomic writes to disk in a transaction
management system using write-ahead logging protocol, in particular a
method for reducing data-loss on user data tables via a utility that
automatically recovers as much data as possible, while informing the
database administrator of exactly which data were not recoverable.

      One area of great concern for relational database management
systems is that of providing for on-line recovery of data, such as
after I/O or power failures, i.e., system crashes.  Various general
approaches have been taken to this problem.  One such approach
provides for redundant copies of the data in the event that the
database needed to be reconstructed, as in the technique of shadow
paging. Another general approach involves maintaining a database
recovery log containing changes to database records.  The information
recorded in the database recovery log insured that changes of
committed transactions were incorporated into the database state
during system restart following a system failure (as well as allowing
changes to database records to be reversed or undone in support of
transaction rollback for uncommitted transactions).  A form of this
technique became known as write-ahead logging wherein the protocol
required that changes be written to the recovery log in the permanent
file prior to being made to the actual database records themselves in
the permanent file.

      Using the write-ahead logging protocol, OS/2* Extended Edition
Database Manager (referred to as DBM) addressed a number of problems
with regard to data recovery.  These included the ability to detect
files with incomplete writes during system restart, and, in
particular, a method for rebuilding indexes after an I/O error had
been detected and identified with an index file. These inventions,
described in U.S. Patent 4,945,474, limited data loss when an I/O
error was detected on a user table to the table in error.  It is
clearly highly desirable to provide a technique for recovering from
I/O errors in user data tables in such a way that only a minimal
amount of data is lost, and the table is back on-line in a minimal
amount of time.

      In DBM, log records are written during normal processing.  The
recovery log is traversed during system restart insuring completion
of logged operations. Non-committed transactions are then undone.
Index files with I/O errors are detected and flagged preventing
subsequent restart operations from accessing the files.  The system
further pro vides for automatic rebuilding of error index files as
part of the restart procedure without requiring explicit user action.

      This article describes extensions to this process in which
incomplete writes in user data files are detected and the data page
is repaired to the extent possible, in most cases allowing system
restart t...