Optimized savepoint during database recovery
AssigneeSap SE
InventorsChristoph Roterring, Dirk Thomsen, Reiner Singer
Life of this patent
Estimating the term…
Abstract
Recovery of a database system can be initiated by taking the database system offline. Thereafter, recovery operations specified by a redo log of the database system are replayed. During the replaying, updates to pages implicated by the recovery operations are blocked. In parallel, modified pages are flushed to physical disk storage. The database is later brought online after all of the recovery operations are replayed.
Claims15
A computer-implemented method comprising:
- initiating asynchronous execution of a savepoint as part of a recovery of a database system by taking the database system offline, the database system comprising an in-memory database storing data in main memory and having associated physical disk storage;
- replaying recovery operations specified by a redo log of the database system;
- blocking updates to modified pages in the main memory that are implicated by the recovery operations during the replaying;
- triggering, during the replaying, any remaining I/O operations during blocking of the updates to the modified pages implicated by the recovery operations;
- flushing modified pages from the main memory to physical disk storage in parallel to the blocking of the updates to pages in the main memory implicated by the recovery operations;
- executing recovery operations specified by the redo log up to a savepoint redo log entry position and then executing the savepoint;
- and
- bringing the database system online after all of the recovery operations are replayed;
- wherein:
- the savepoint comprises two phases:
- a first phase during which the modified pages are flushed from the main memory to physical disk storage and, in parallel, updates to pages in the main memory that are implicated by the recovery operations specified by the redo log are blocked and a second phase that occurs subsequent to the first phase during which remaining I/O is completed;
- replay of recovery operations continues after the first phase of savepoint is executed.
A system comprising:
- at least one data processor;
- and
- memory storing instructions which, when executed by the at least one data processor, result in operations comprising:
- initiating asynchronous execution of a savepoint as part of a recovery of a database system by taking the database system offline, the database system comprising an in-memory database storing data in main memory and having associated physical disk storage;
- replaying recovery operations specified by a redo log of the database system;
- blocking updates to modified pages in the main memory that are implicated by the recovery operations during the replaying;
- triggering, during the replaying, any remaining I/O operations during blocking of the updates to the modified pages implicated by the recovery operations;
- flushing modified pages from the main memory to physical disk storage in parallel to the blocking of the updates to pages in the main memory implicated by the recovery operations;
- executing recovery operations specified by the redo log up to a savepoint redo log entry position and then executing the savepoint;
- and
- bringing the database system online after all of the recovery operations are replayed;
- wherein:
- the savepoint comprises two phases:
- a first phase during which the modified pages are flushed from the main memory to physical disk storage and, in parallel, updates to pages in the main memory that are implicated by the recovery operations specified by the redo log are blocked and a second phase that occurs subsequent to the first phase during which remaining I/O is completed;
- replay of recovery operations continues after the first phase of savepoint is executed.
A computer program product comprising non-transitory machine readable storage medium storing instructions which, when executed by at least one data processor forming part of at least one computing system, result in operations comprising:
- initiating asynchronous execution of a savepoint as part of a recovery of a database system by taking the database system offline, the database system comprising a primary database system and a secondary database system, the secondary database system comprising an in-memory database storing data in main memory and having associated physical disk storage;
- replaying recovery operations specified by a redo log of the secondary database system;
- blocking updates to modified pages in the main memory that are implicated by the recovery operations during the replaying;
- triggering, during the replaying, any remaining I/O operations during blocking of the updates to the modified pages implicated by the recovery operations;
- flushing modified pages from the main memory to physical disk storage in parallel to the blocking of the updates to modified pages in the main memory implicated by the recovery operations;
- executing recovery operations specified by the redo log up to a savepoint redo log entry position and then executing the savepoint;
- and
- bringing the secondary database system online after all of the recovery operations are replayed;
- wherein:
- the savepoint comprises two phases:
- a first phase during which the modified pages are flushed from the main memory to physical disk storage and, in parallel, updates to pages in the main memory that are implicated by the recovery operations specified by the redo log are blocked and a second phase that occurs subsequent to the first phase during which remaining I/O is completed;
- replay of recovery operations continues after the first phase of savepoint is executed.
Dependencies are inferred from the claim text.