DBMS Internals: Transactions vs. Redo Logs
Posted in 1996
I'm still not clear regarding transactions and redo logs, which are important in designing a backup scheme. Here's what I understand: - On-line transactions happen immediately in memory - Another writer process, working with a little delay, reads the memory and writes the transactions into BOTH the redo logs and the physical datafiles (If not into both, when are the logs applied to the datafiles?) - The redo logs are there, so that the backup is easier, as backing up the logs to tape is way less time consuming than backing up the physical datafiles. - When database recovery is necessary, restore the backup copy of the physical datafiles and then apply all the redo logs accumulated since the physical datafile backup - Corrolary: - The physical datafiles are always as up to date as the redo logs, redo logs being there to facilitate backup - Since transactions happen instantaneously only in memory and the writer process operates with a little delay, in case of power failure, recoverable transactions are those in the redo logs and some latest transactions in memory are lost. Is this correct? Thanks in anticipation. Yudong