Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Data Buffer Cache

Re: Data Buffer Cache

From: Michael J. Moore <hicamel_x_the_spam_at_attbi.com>
Date: Sun, 15 Sep 2002 01:29:02 GMT
Message-ID: <ynRg9.482564$UU1.77684@sccrnsc03>

>
> You've missed one. LGWR flushes to disk:
>
> 1. At every commit
> 2. When the log buffer is a third full
> 3. When 1Mb of unflushed redo is outstanding
> 4. BEFORE DBWR
>
> Number 4 is the one which means that DBWR certainly does post LGWR.
>
> Regards
> HJR
>
>

Hi Howard,
I wonder if your assumption about the meaning of number 4 is correct. I am looking at the OCP Fundamentals 1 Exam guide and on page 19 it gives the 4 conditions as you stated, but on page 18 it says that DBWn does writes for any of the following reasons ... and then reason number 2 is "When DBW0 is told to write data to disk by LGWR"

So, it appears HERE that LGWR it telling DBWR. I suppose that it is possible that each could tell the other, but I doubt if that is the way it works.

The to further complicate the matter, at the top of page 19 it says, "The event that
causes LGWR to tell DBW0 to write to disk is called a checkpoint."

Great!, now we have 2 votes for LGWR tells DBW0 and 1 vote for DBW0 tells LGWR. But the idiocy is not over! Later in the same book on page 129 it says" "The events that occur at log switch are as follows. First, LGWR stops writing
the redo log it filled. Second, CKPT signals the DBWn to flush the dirty buffers into
the data files and ...."

So, how can we reconcile all of this? At the risk of being bitch slapped by Ricky
again I will wager another GUESS. How about 1)LGWR finishes filling a log file and then throws a checkpoint and then waits

2)CKPT signals the DBWn to flush the dirty buffers into the data files
3)CKPT updates the control files and datafile headers
4)CKPT finishes his job and DBWn finishes his job
5)LGWR completes the log switch

IF this is true, then LGWR does (in a way) trigger DBW0 albiet INDIRECTLY via the checkpoint mechanism.
But Ricky is also correct to say that LGWR DOES NOT post DBW0, as the invocation is really the side effect of of issuing a checkpoint.

So, even though Oracle's own documentaion says, "The redo log buffer writes to the redo log file under the following situations:"

1) omitted
2) omitted
3) omitted
4) "Before DBW0 writes modified blocks in the database buffer cache to the
datafiles"

I suspect that #4 is highly misleading and hence Ricky omitted it.

Ricky?

regards,
Mike Received on Sat Sep 14 2002 - 20:29:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US