码迷,mamicode.com
首页 > 数据库 > 详细

innodb_fast_shutdown中值为1或者2的区别是?

时间:2015-04-29 00:34:24      阅读:252      评论:0      收藏:0      [点我收藏+]

标签:

innodb_fast_shutdown=0 , 1 , 2时的意思分别是

0

把buffer pool中的脏页刷到磁盘和合并insert buffer,当然包括redo log也会写到磁盘中。

 

2

只把redo log刷到磁盘中,然后关闭

 

1

关于1,它解释说,是先暂时略过一些flush操作,但没有具体说忽略哪些操作。manual中也没有详细说明,

The default shutdown procedure for InnoDB, based on the configuration setting innodb_fast_shutdown=1. To save time, certain flush operations are skipped. This type of shutdown is safe during normal usage, because the flush operations are performed during the next startup, using the same mechanism as in crash recovery. In cases where the database is being shut down for an upgrade or downgrade, do a slow shutdown instead to ensure that all relevant changes are applied to the data files during the shutdown.

 

所以我不是很明白2和1的区别, 为了找到答案,只能看代码了。最后发现这个函数

buf_flush_page_cleaner_thread,其中就描述了内部细微的区别。 因为涉及到具体的实现,我就没看了。

 

好吧,有时间再看。

 

innodb_fast_shutdown中值为1或者2的区别是?

标签:

原文地址:http://www.cnblogs.com/youge-OneSQL/p/4464459.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!