zoukankan      html  css  js  c++  java
  • innodb_fast_shutdown中值为1或者2的区别是?

    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,其中就描述了内部细微的区别。 因为涉及到具体的实现,我就没看了。

    好吧,有时间再看。

    MySQL限时解答,24小时内友哥专业解答
    http://www.yougemysqldba.com
    如有进一步需要请联系微信onesoft007
    微博账号@友哥一指
  • 相关阅读:
    PHP多进程编程
    2013年中国数据库大会PPT
    python学习笔记
    策略分析方法论
    Linux操作系统下定时发送邮件
    PHP初学
    Linux操作下的进程管理利器 Supervise
    Hive中小表与大表关联(join)的性能分析zz
    工作杂记4
    PostgreSQL 13 源码安装【转载】 规格严格
  • 原文地址:https://www.cnblogs.com/youge-OneSQL/p/4464459.html
Copyright © 2011-2022 走看看