Soft checkpointing system using log sequence numbers derived from stored data pages and log records for database recovery
First Claim
1. A method for use in a computerized database system having a processor and associated memory in a database comprising:
- storing data corresponding to a plurality of updated data pages in said memory;
deriving from said stored data MINBUFLSNs functionally related to updates of corresponding ones of said updated pages;
storing log records each corresponding to an in-flight database transaction in said memory;
deriving from said stored log records LOWTRANLSNs functionally related to one of said in-flight transactions;
deriving checkpoints as a function of said MINBUFLSNs and said LOWTRANLSNs;
storing said checkpoints in said memory;
writing a plurality of log records to a recovery log in said memory;
generating a metric of said writing of said log records comprised of a number N corresponding to a number of said writes of said log records to said recovery log;
writing a plurality of checkpoints as a function of said metric;
retrieving said MINBUFLSNs and said LOWTRANLSNs from one of said stored checkpoints stored in said memory;
comparing said retrieved MINBUFLSNs and said LOWTRANLSNs; and
starting full forward recovery of said database by said system at a location in said recovery log functionally related to said MINBUFLSNs if said LOWTRANLSNs is equal to or greater than said MINBUFLSNs.
1 Assignment
0 Petitions
Accused Products
Abstract
Functions MINBUFLSN and LOWTRANLSN, implemented in a computerized routine, are defined and comprise first and second components of a checkpoint. MINBUFLSN is functionally related to a first update to a first of "dirty" data pages in the RAM buffer. LOWTRANLSN is functionally related to the earliest update of a sequence in a transaction table wherein each update corresponds to an uncommitted transaction. The two components are derived during write-ahead logging and stored in the log header periodically as a function of logging activity. Upon recovery, the checkpoint is retrieved and a functional comparison between the components thereof employed in the recovery algorithm. The conventional analysis pass of the recovery log is avoided and a reduced overhead during logging is provided as well as an efficient recovery.
169 Citations
4 Claims
-
1. A method for use in a computerized database system having a processor and associated memory in a database comprising:
-
storing data corresponding to a plurality of updated data pages in said memory; deriving from said stored data MINBUFLSNs functionally related to updates of corresponding ones of said updated pages; storing log records each corresponding to an in-flight database transaction in said memory; deriving from said stored log records LOWTRANLSNs functionally related to one of said in-flight transactions; deriving checkpoints as a function of said MINBUFLSNs and said LOWTRANLSNs; storing said checkpoints in said memory; writing a plurality of log records to a recovery log in said memory; generating a metric of said writing of said log records comprised of a number N corresponding to a number of said writes of said log records to said recovery log;
writing a plurality of checkpoints as a function of said metric;retrieving said MINBUFLSNs and said LOWTRANLSNs from one of said stored checkpoints stored in said memory; comparing said retrieved MINBUFLSNs and said LOWTRANLSNs; and starting full forward recovery of said database by said system at a location in said recovery log functionally related to said MINBUFLSNs if said LOWTRANLSNs is equal to or greater than said MINBUFLSNs.
-
-
2. A method for generating components of a checkpoint for use in recovery of a database, comprising:
-
1. generating indicators of a first sequence of occurrence of updates to said database, each said update corresponding to an in-flight transaction and one of said indicators; 2. selecting one of said indicators as a first of said components of said checkpoint; 3. generating LSNs which are indicators of a second sequence of occurrence of first updates to data pages in a buffer; 4. selecting one of said LSNs as a value derived from a function MINBUFLSN corresponding to a first update of a first of said data pages in said buffer to be updated as a second of said components of said checkpoint; 5. writing to a recovery log a representation of said first and second components; 6. generating a measure of log record creation; and - View Dependent Claims (4)
-
-
3. regulating time between said writing of adjacent ones of said next sets of first and second components as a function of said measurement.
Specification