An Overview of a Page Change

We ask a lot of RDBMSs. We want them to be big and fast but to always ensure that the data is in a consistent state. To accomplish the speed requirement, they’ve got to keep lots of things in memory. But to ensure the integrity requirement, they’ve got to be very careful. It’s difficult to juggle knives without cutting off a finger or two.

Anatomy of a page change

Figure 13-4. Anatomy of a page change

Please refer to Figure 13-4 throughout this section. That figure shows that there are four main storage areas of an RDBMS. There is the datafile itself, the rollback log, the transaction log, and shared memory. Shared memory is further divided into the data buffer, the rollback log buffer, and the transaction log buffer. Not all RDBMSs work exactly this way, but they are all similar. What happens when a user enters a transaction? Before anything happens, the beginning of the transaction is recorded in the transaction log. Then, for each page that needs to be changed, the following steps are taken:

  1. The RDBMS reads the page that is to be modified and loads it into the data buffer. Until proper safeguards have been put in place, this is where the page stays for a while.

  2. The transaction then wants to change the page, but first it saves a copy of what it looked like prior to changing it. This before image is placed in the rollback log buffer.

  3. The after image of the page is recorded in the ...

Get Unix Backup and Recovery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.