I in database transactions (acid) refers to isolation (isolation): Unfinished (that is, uncommitted) transactions must be invisible. During a transaction, only one session that executes the transaction can see the changes.
Oracle uses restoration segments to implement isolation. Objective of Undo: (1) transaction recovery; (2) Transaction rollback; (3) read consistency
Code
SQL > Select Name, Value From V $ Parameter Where Name Like ' % Undo % ' ;
NAME value
------------------------------------------------------------
Undo_management auto
Undo_tablespace undo
Undo_retention900
Next we will analyze the isolation implementation through the update process.
First, place a lock on all records affected by the DML operation and the associated index key, and then generate a redo. At this time, the server process writes data in the log buffer to be applied to changes in the specified data block. This redo generation operation applies to changes in data blocks and changes in undo blocks. If a column is part of an index, it also writes changes in the index and changes in the Undo block to the log buffer. After the redo is generated, the (1) (2) operation is completed. Then, as shown in the image.
PS: At the beginning, I never understood isolation. That is, if there is no commit, only the update session can be executed to see the change. Other sessions can still see the original value. Even more confused, When you execute commit (only triggering lgwr and not triggering dbwr), the data is not actually written to DB files, the updated value can be seen in other sessions. It is not confusing until you know how to use the Undo segment and redirection.