110 likes | 207 Views
Figure 25.1 Organization of memory. Figure 25.2 Log example. Figure 25.3 The recovery procedure can handle database restoration correctly with a write-ahead log.
E N D
Figure 25.3The recovery procedure can handle database restoration correctly with a write-ahead log.
Figure 25.4Implementing durability using a force policy. It might be necessary to force the pages a transaction has updated out of the cache before the transaction’s commit record is written to the log. Before the dirty page updated by T, containing LSN value j, can be written to the database, it might be necessary to force the log buffer (1) so that the update record with LSN equal to j is on mass storage. After the dirty page has been written (2), the commit record for T can be appended to the log buffer (3). The log buffer can be written to the log at some later time.
Figure 25.5Implementing durability using an after-image with a no-force policy. The write-ahead feature requires that, before a dirty page updated by T can be written to the database (2), the corresponding update record must be written to the log on mass storage (1). Although the commit record cannot be written before the update record, the relationship between the time the commit record is written and the time the dirty page is written is not constrained.
Figure 25.6Log showing records for an aborted transaction that has updated database variable x. The log contains both an update record and a compensation log record for x.
Figure 25.8(a)Effect of transactions being active while a dump is taken.
Figure 25.8(b)Effect of transactions being active while a dump is taken (continued).
Figure 25.8(c)Effect of transactions being active while a dump is taken (continued).