When is data written to the redo log buffer? [message #59480] |
Tue, 25 November 2003 10:36 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
DB
Messages: 7 Registered: February 2003
|
Junior Member |
|
|
My understanding is that the database buffer cache and the redo log buffer are two separate parts of the SGA.
Server processes performing DML create undo blocks and make changes to data blocks in the database buffer cache.
I have not found a reference that explains how the appropriate redo information from these changes makes its way into the redo log buffer. Does the user's server process write to the database buffer cache and to the redo log buffer at the same time? Or are these areas actually one in the same?
Thanks!
|
|
|
Re: When is data written to the redo log buffer? [message #59491 is a reply to message #59480] |
Wed, 26 November 2003 08:48 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Thiru
Messages: 1089 Registered: May 2002
|
Senior Member |
|
|
Those areas(ie data buffer cache & log buffer cache) are different areas in the SGA.
After the Server process reads the necessary data blocks (either from the cache or from the datafile) in consistent + current mode, it locks(latches) those buffers to construct the change vector(ie redo entries) comprising of the table block change(and index block change if indexes are present),undo segment change etc , copies the redo entries into the log buffer cache on its way to the online redolog files after acquiring the necessary latches(ie redo allocation etc) and applies the data block changes.
The dirty blocks in the buffer cache eventually gets flushed onto the datafiles by the DBWR process. The LGWR processes writes the redo entries onto the online log files when any of the following happens :
i) LGWR timeout ( 3 seconds)
ii) Commit is issued
iii) Log_buffer is more than 1/3rd full
iv) DBWR triggers LGWR to flush the buffers
Hope this helps
-Thiru
|
|
|
|