MySQL principle ~lsn that thing.

Source: Internet
Author: User

A brief introduction: Today let's talk about the LSN number.
Two view LSN:
Show Engine InnoDB Status

Log Sequence Number 2687274848548
Log flushed up to 2687274848516
Pages flushed up to 2687273963960
Last checkpoint at 2687273963960

1 Brief description

Log Sequence Number: The maximum LSN of the current system
Log flushed up to: LSN that is currently written to the redo log file
Pages flushed to: LSN number for which changes have been written to the dirty page
Last checkpoint at is the first time the system has refreshed buffer pool dirty data to disk checkpoint
More than 2 of the 4 LSN are decremented, namely: Lsn1>=lsn2>=lsn3>=lsn4.
Three content

Each data page has an LSN, and the redo log has a lsn,checkpoint LSN.

Four definition description
1 LSN (log sequence number) log sequence numbers, 8 bytes after 5.6.3, LSN primarily used to RECOVERY,LSN data when crash occurs is a continuously incrementing integer number representing the total amount of bytes that the transaction writes to the log.
LSN not only exists in the redo log, but also has a corresponding LSN number at the head of each data page, which records the LSN number of the last modification of the current page and is used to make a log LSN number for the specific gravity at recovery to determine whether to restore the page. The checkpoint mentioned earlier is also recorded with the LSN number, and the LSN number is a concatenation of the start of a transaction to the recovery process.

MySQL principle ~lsn that thing.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.