Redo Logs in Database Systems

用 ChatGPT 查了下 redo log 是怎麼用在 database crash or power loss 後的 recovery 裡,這邊做個小筆記統整一下:

  • 進行交易時,會依序進行以下步驟:
    1. 寫 redo log, 裡面記錄準備要做的改變,並記錄這個 transaction 的狀態為 in progress
    2. 把 redo log 紀錄的那些改變實際寫入 database files
    3. 把 redo log 的 transaction 狀態改為 committed
    4. 回傳 OK
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×