InnoDB Freeze

Summary

This feature makes it possible to freeze InnoDB file system activity except for reads. If you want to take a database backup without stopping the server and you don’t use LVM, ZFS or other storage layer that provides snapshots, you can use this to halt all destructive file system activity from InnoDB and then backup the InnoDB data files. Since InnoDB uses background I/O threads, merely running FLUSH TABLES WITH READ LOCK would not be sufficient.

This patch was introduced in patchset d7.

Patch Origin

Google, extracted by from V2 patch by David Stainton (Spinn3r).

Commands

  • SET GLOBAL innodb_disallow_writes = 0|1 – Enable/Freeze Innodb file system activity. It’s only possible to set this option through a client connection. It cannot be specified as a config option; writes are always enabled on startup.
Note: the behaviour of this patch has not been tested for a prolonged or permanent read-only state, and thus it’s not currently recommended to try and use it for such a purpose. The objective is to make backups from a live server possible.

Comments are closed.