ITPub博客

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

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

作者:友哥 时间:2015-04-28 23:55:00 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,其中就描述了内部细微的区别。 因为涉及到具体的实现,我就没看了。

 

好吧,有时间再看。

 

原文作者:;如有侵权,请联系管理员删除。

下一篇: CommonTwo
请登录后发表评论 登录
全部评论

注册时间:2020-05-20

  • 博文量
    276
  • 访问量
    1001