Patent ID: 7966298

Claim:
A processor-implemented method for processing database transactions against a database having a plurality of records stored on a plurality of database pages, comprising: receiving a first transaction that specifies an operation for changing state for a first of the plurality of records stored on a first of the plurality of database pages, wherein the operation is one of an insert, update, or delete operations; changing the state of the first record according to the first transaction; storing in a companion page, a transaction identifier of the first transaction, data describing the specified operation, a page identifier of the first page, a before look and an after look of the first record for an update operation, and an after look of the first record for an insert operation; in response to a commit of the first transaction: determining whether a second transaction, that specifies a change in state for a second of the plurality of records and the second record being stored on the first page, is in-process; storing, in response to determining that the second transaction is in process, the companion page in an audit trail; storing in the audit trail, in response to determining that the second transaction is not in process, a transaction identifier of the first transaction, a page identifier of the first page and a before look and an after look of the first record; and in response to a request to recover the database, performing the steps including: for each database page in the audit trail for a committed transaction, storing the database page in a database file in persistent storage; for each companion page in the audit trail that specifies a change to a database page prior to an entry being stored in the audit trail for the database page, bypassing updating the database according to the operation specified in the companion page; and for each companion page in the audit trail for a committed transaction and for which an entry in the audit trail was not made for a corresponding database page, applying the operation specified in the companion page to the database page and storing the database page in persistent storage.