What Happens to Pages in the Buffer Pool when your Availablity Group Fails Over?

Spread the love

Recently at SQL Saturday Philadelphia, we started discussing failover  as it relates to mirroring and Always On Availability Groups. Specifically, we were wondering what would happen if you had a relatively busy readable secondary replica (which would have a lot of pages in the buffer pool on the secondary instance) and if those pages would be flushed from cache or anything like that. So I reached out to the product group and Kevin Farlee from Microsoft was extremely helpful:

Pages in the buffer pool are still valid, as they are updated by the redo thread.  By the time the secondary has transitioned to primary, all pending updates will have been applied, so pages in the bufferpool will all have correct contents. Note that the set of pages in bufferpool may be different between primary and secondary so you may have some cache warm up to do.”

So in a nutshell, if you have a busy readable secondary your cache won’t take much time to warmup, since the hot pages are already there.

1 thought on “What Happens to Pages in the Buffer Pool when your Availablity Group Fails Over?

  1. Madge

    Oh my goodness! Incredible aricle dude! Thanks, However
    I amm experiencing problems with your RSS. I don’t understand the reason why I cannot subscribe tto it.
    Is there anyone else having the same RSS problems?
    Anytone that knows the solution can yoou kindly respond?

    Thanx!!

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.