Oracle Core Technology notes (this book is not carefully read, so you need to read it later ~~), Oracle Core Technology
Oracle Core Technology jump to: navigation, search
Directory
- Start 1
- 2redo and undo
- 3. Transactions and consistency
- 4. locks and latches
- 5 cache and copy
- 6. Write and restore
- 7. Analysis and Optimization
- 8RAC and 'defect'
- 9 appendix A dump and debugging
|
Start redo and undo
- The actual order is 3 1 2 4 4, 2 redo logs are merged into one log record and written to the redo buffer.
- The first modification in the transaction contains some special steps *
- (My summary) theoretically, if the redo log is successfully written, it means that the transaction has been successfully committed. If the database crashes and the current status in the memory is not updated to the database storage, the redo operation can be performed to ensure the completion of the transaction. On the other hand, the failure of a nested transaction causes the database update to be rolled back. In this case, undo is required, however, the undo itself may be lost due to the crash of the storage in the volatile region. In this case, you need to use the undo redo log to restore the dataPrevious consistent status
-
From the above description, we can see that the transaction implementation depends on the data modification which is reversible. Otherwise, the state will be easy to lose (such as value assignment and file write operations ).
Consistent recovery
-
Consistency recovery depends on the creation of global consistency snapshots (MVCC). Therefore, the special underlying attributes such as the transaction ID and timestamp are required. Refer to the related concepts in CLojure language.
Why?The undo record prevents other users from viewing the data that we are changing (intermediate temporary status)
Redo allocation latch: protects the redo log buffer (because only one lgwr performs serial write operations)
P17 everyone is doing a little "extra" work (collaboration overhead ?), It means they can work in different places at the same time, without having to compete in the same place frequently (contention)
Redo simplicity
Undo complexityTransactions and consistency
Transactions and undo
X $ ktuxe
Newing, & flash back...
A single undo block can contain the undo records of multiple transactions
Data block access and undo
Submit SCN
Large Object (LOB)
SummaryLocks and latches
Wait for the wake-up mechanism (equivalent to the semaphore in the Linux kernel ?)
Library cache latch
Lock: Protection object (Lock = queue ?)
Deadlock
Lock mode
Locks *
KGL lock (and pin)
The lock and pin => 11G are gradually replaced by Mutex.Cache and Replication
Multiple Data Block caches
Working Set
LRU/TCH Algorithm
REPL_AUX
Search for DataWrite and recovery
Dbwr
Write process interaction
RestoreAnalysis and Optimization of RAC and "defect" Appendix A dumping and debugging