0

A checkpoint writes the current in-memory modified pages (known as dirty pages) and transaction log information from memory to disk, and also records the information in the transaction log.

Log records are always hardened to disk after which the client application gets the acknowledgment.

So what does the quote mean by checkpoint writes transaction log information from memory to disk? Does this refer to log records getting written to the log file on disk?

3
  • Yes, that is what it's referring to
    – Craig
    Commented Sep 8, 2023 at 3:56
  • Why do dirty log pages need to be written to disk. I'm asking because log records get written to disk anyways before sending commit to client.
    – variable
    Commented Sep 8, 2023 at 7:45
  • 1
    dba.stackexchange.com/a/288848/220697 During a checkpoint not only are dirty pages flushed, the fact a checkpoint happened is also written to the log and flushed. From a previous reference: "SQL Server has logic that prevents a dirty page from being flushed before the associated log record is written." This is an answer to your own earlier question Commented Sep 8, 2023 at 13:10

1 Answer 1

0

Log records are always hardened to disk after which the client application gets the acknowledgment.

Log records for uncommitted transactions may not be hardened to disk, and when you checkpoint a dirty page, the change may need to be rolled back. So you must harden the log records too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.