Innodb_fast_shutdown=0, 1, 2 o'clock means
0
Brush the dirty pages in buffer pool to disk and merge insert buffer, including, of course, the redo log is also written to disk.
2
Just brush the redo log to disk and close
1
With regard to 1, it explains that it is a temporary skip over some flush operations, but does not specifically ignore which operations. Manual is not explained in detail,
The default shutdown procedure for InnoDB, based on the configuration setting innodb_fast_shutdown=1
. To save time, certain flush operations is skipped. This type of shutdown was safe during normal usage, because the flush operations is performed during the next startup, Usi Ng the same mechanism as in crash recovery. In cases where the database was being shut down for an upgrade or downgrade, does a slow shutdown instead to Ens Ure that all relevant changes is applied to the data files during the shutdown.
So I do not quite understand the difference between 2 and 1, in order to find the answer, can only look at the code. And finally found this function
Buf_flush_page_cleaner_thread, which describes the subtle differences in the interior. I didn't see it because it involved a concrete implementation.
Well, there's time to see it again.
Innodb_fast_shutdown the difference between a value of 1 or 2?