EP0625752A2

Method and means for archiving in a transaction management system.

Abstract

A method and means for archiving files of modifiable pages in a log based phased commit transaction management system (TMS) in which those pages which have been modified since the last full or incremental backup do not require during the copy operation any modifications to the page itself but merely to a common status page. This is accomplished by management of a pair of global log sequence numbers. Comparison between a first number (ICBU_LSN) and each data page LSN as the page is modified permits the common status page to be updated to correctly reflect the changed status. Subsequent modifications to the same page do not require amendment of the status page. The status page indicia are reset as part of the backup procedure and for ascertaining the page copy set for incremental copying. The ICBU_LSN assumes one of two values as a function of the copy operation and another value for processing page modifications after the copy operation. A second number (ICRF_LSN) is used in the restoration of a file after the file has been partially restored by a page merge in page number order from full and incremental copies. In this case, the ICRF_LSN defines the point in the log for redo since the most recent copy was made.

EP0625752A2, drawing sheet 1
Sheet 1 of 11

Term

Term ended

Projected expiry passed 11 May 2014, 12.4 years ago.

  1. Priority
  2. Filed
  3. Published
  4. Projected expiry
  5. Today

6 claims: 4 independent, 2 dependent

  1. 1
    A method for archiving a file of modifiable pages in a phased commit transaction management system (TMS) having a log, a processor, and a storage subsystem in which pages stored therein are staged to and from the processor, said file having a header page, status page (SMP), and at least one data page, the processor being responsive to each transaction and executing selective modifications to predetermined ones of the pages, each modification to a page state being recorded in the log and assigned an ascending log sequence number (page_LSN), said page_LSN being recorded on the page, comprising the steps of:(a) creating and maintaining a first global log sequence number (ICBU_LSN) on said header page and a plurality of status bits (ICB) on said SMP, each ICB being counterpart to each of the data pages and indicative of the page having been modified since an immediately prior archive or copy operation;(b) setting the ICBU_LSN to a maximum value, and establishing a second global log sequence number (ICRF_LSN) and recording it in a system catalog;(c) ascertaining a set of pages subject to archiving by scanning the ICB's in the SMP and resetting that subset otherwise set;(d) executing a copy operation by in turn latching, copying, and unlatching each page of the subset scanned and reset in step (c) for incremental copying and for all pages irrespective of their ICB condition for full copying;(e) setting the ICBU_LSN to the current end_of_log_LSN value and recording it in the header page;and(f) responsive to each page modification, setting the counterpart ICB in the SMP if the page_LSN < ICBU_LSN, and recording the action in the log with a REDO only log record.
  2. 4
    A method as claimed in any of the preceding claims, wherein said TMS maintains a list of pages already modified or in the process of being modified, the method steps being modified such they comprise:(a') setting the ICBU_LSN to a maximum value and S latching each page in the modified list;(b') setting the ICBU_LSN to a non-maximum value and, selecting a value for the ICRF_LSN;(c') ascertaining a set of pages subject to archiving by scanning the ICB's in the SMP and resetting that subset otherwise set;and(d') executing a copy operation by in turn latching, copying, and unlatching each page of the subset scanned and reset in step (c) for incremental copying and for all pages irrespective of their ICB condition for full copying.
  3. 5
    A method for archiving a database of modifiable pages in a phased commit transaction management system (TMS) having a log, a processor, and a storage subsystem in which pages stored therein are staged to and from the processor, the processor being responsive to each transaction and executing selective modifications to predetermined ones of the pages, each modification to a page state being recorded in the log and assigned an ascending log sequence number (page_LSN), said page_LSN being recorded on the page, comprising the steps of:(a) initializing a copy operation for a partition of the database by (1) invoking a database control block (DBCB) for said partition, said partition having a header page, at least one data page, and at least one space map page (SMP) including a status bit (ICB) for each data page indicative as to whether the data page has been modified since execution of a prior copy operation,(2) atomically setting an LSN of a first kind (ICBU_LSN) to a maximum value in the DBCB, setting an LSN of a second kind (ICRF_LSN) to a value set by the current end_of_log LSN, and recording the ICRF_LSN in a system catalog, and(3) ascertaining the set of data page's subject to copying for each SMP by resetting all ICB's of data pages indicative of being updated since the last copy operation and recording all of the ICB's so reset in the log;and(b) executing said copy operation by (1) for each SMP, latching, copying, and unlatching each data page identified in step (a)(3), and(2) updating the ICBU_LSN in the DBCB and the header page to the current end_of_log LSN value,(3) committing the operation, and(c) responsive to each page modification, setting the counterpart ICB in the status page if the page_LSN < ICBU_LSN and record the action in the log.
  4. 6
    A data processing system having means for archiving files of modifiable pages in a phased commit transaction management (TMS) including a log, a processor, and a storage subsystem in which pages stored therein may be staged to and from the processor, said files each having a header page, status page (SMP), and at least one data page, the processor being responsive to each transaction and able to execute selective modifications to predetermined ones of the pages, each modification to a page state being recorded in the log and assigned an ascending log sequence number (page_LSN), said system including means for recording said page_LSN on the page, comprising:(a)means for creating and maintaining a first global log sequence number (ICBU_LSN) on said header page and a plurality of status bits (ICB) on said SMP, each ICB being counterpart to each of the data pages and indicative of the page having been modified since an immediately prior archive or copy operation;(b) means for setting the ICBU_LSN to a maximum value, and establishing a second global log sequence number (ICRF_LSN) and recording it in a system catalog;(c) means for ascertaining a set of pages subject to archiving by scanning the ICB's in the SMP and resetting that subset otherwise set;(d) means for executing a copy operation by in turn latching, copying, and unlatching each page of the subset scanned and reset in step (c) for incremental copying and for all pages irrespective of their ICB condition for full copying;(e) means for setting the ICBU_LSN to the current end_of_log_LSN value and recording it in the header page;and(f) means responsive to each page modification, for setting the counterpart ICB in the SMP if the page_LSN < ICBU_LSN, and recording the action in the log with a REDO only log record.