All other log records can be deleted after each

Info iconThis preview shows pages 2–4. Sign up to view the full content.

View Full Document Right Arrow Icon
All other log records can be deleted. After each checkpoint, more records become candidates for deletion as per the above rule. Deleting a log record while retaining an earlier log record would result in gaps in the log, and would require more complex log processing. There- fore in practise, systems Fnd a point in the log such that all earlier log records can be deleted, and delete that part of the log. Often, the log is broken up into multiple Fles, and a Fle is deleted when all log records in the Fle can be deleted. Archival logging : Archival logging retains log records that may be needed for recoveryfrom media failure (such as disk crashes). Archival dumps are the equivalent of checkpoints for recovery from media failure. The rules for deletion above can be used for archival logs, but based on the last archival dump instead of the last checkpoint. The frequency of archival dumps would be lesser than checkpointing, since a lot of data has to be written. Thus more log records would need to be retained with archival logging. 16.4 Describe how to modify the recovery algorithm of Section 16.4 to imple- ment savepoints, and to perform rollback to a savepoint. (Savepoints are described in Section 16.8.3.) Answer: A savepoint can be performed as follows: a. Output onto stable storage all log records for that transaction which are currently in main memory. b. Output onto stable storage a log record of the form <savepoint T i >, where T I is the transaction identiFer.
Background image of page 2

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Practice Exercises 17 To roll back a currently executing transaction partially till a particular savepoint, execute undo processing for that transaction, till the savepoint is reached. Redo log records are generated as usual during the undo phase above. It is possible to perform repeated undo to a single savepoint by writing a fresh savepoint record after rolling back to that savepoint. The above algorithm can be extended to support multiple savepoints for a single transaction, by giving each savepoint a name. However, once undo has rolled back past a savepoint, it is no longer possible to undo upto that savepoint. 16.5 Suppose the deferred modiFcation technique is used in a database. a. Is the old-value part of an update log record required any more? Why or why not? b. If old values are not stored in update log records, transaction undo is clearly not feasible. How would the redo-phase of recovery have to be modiFed as a result? c. DeferredmodiFcation can be implementedby keepingupdateddata items in local memory of transactions, and reading data items that have not been updated directly from the database buffer. Suggest how to efFciently implement a data item read, ensuring that a trans- action sees its own updates. d.
Background image of page 3
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page2 / 8

All other log records can be deleted After each checkpoint...

This preview shows document pages 2 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online