March 30, 2012 at 6:52 am
Hello!
As may be you know there is brilliant book from Kalen Delaney (and others) "Microsoft® SQL Server® 2008 Internals". You may read it's "Chapter 4" for free here.
Let's discuss the illustration from this Chapter 4, here:
Correct me if I am wrong, but... How this is possible at all? The "Minimum recovery LSN"=minLSN on the picture is more to the right than oldest (activity?) transaction? Does BOL not tell to us:
The MinLSN is the minimum of the:
-LSN of the start of the checkpoint.
-LSN of the start of the oldest active transaction.
-LSN of the start of the oldest replication transaction that has not yet been delivered to the distribution database.
??
I think in this case two vertical lines "Minimum recovery LSN" and "Oldest transaction" must be the same, on the place of second. What do you think?
I thank in advance for your answers.
March 30, 2012 at 7:01 am
Two different things.
The minLSN you are talking about (from BoL) is the one that controls log reuse. The MinLSN is the earliest of a number of things that keep the log active.
The minimum LSN in that diagram (which is labled as minimum recovery LSN, not minLSN) is for database recovery (crash recovery) and is, as Kalen says, the earliest point at which the recovery process expects to have to redo transactions. It will check back to oldest open transaction (and hold locks), but it doesn't expect to have to redo anything before the minLSN. Operations from before a checkpoint may need to be undone, but never redone.
minLSN != minumum recovery LSN. Different things used at different times for different purposes.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 30, 2012 at 7:04 am
A!!! Think you are right, Kalen says about different minLSN, thanks to you for clear!
But Kalen should choose less confuse term for "her" minLSN, 'Minimum crash LSN', may be. "Minimum recovery LSN" is very... obstructive.
minLSN != minumum recovery LSN
They are. For example, the article Checkpoints and the Active Portion of the Log in BOL:
One piece of information recorded in the checkpoint is the log sequence number (LSN) of the first log record that must be present for a successful database-wide rollback. This LSN is called the Minimum Recovery LSN (MinLSN).
March 30, 2012 at 7:46 am
Shcherbunov Neil (3/30/2012)
A!!! Think you are right, Kalen says about different minLSN, thanks to you for clear!But Kalen should choose less confuse term for "her" minLSN, 'Minimum crash LSN', may be. "Minimum recovery LSN" is very... obstructive.
minLSN != minumum recovery LSN
They are.
Not in the sense Kalen is using the term they are not.
If you read the three paragraphs above the diagram, the "minimum recovery LSN" is the lowest LSN in the dirty page table constructed by the analysis phase of recovery, not the earliest of (oldest open transaction), (last checkpoint) or (oldest unreplicated transaction)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply