In the MY SQL documentation Instance Dump Utility, Schema Dump Utility, and Table Dump Utility
-
The compatibility option – strip_tablespaces
Does it remove all references to tablespaces or only in the GRANT statement. Can you please provide an example for how this option makes change in the dump statement? -
consistent
The documentation mentions that backup locks are released before the backup then how are consistent backups taken? START TRANSACTION WITH CONSISTENT SNAPSHOT is mentioned. Does it take snapshots?
If yes, what is the memory requirement?
Thank you!
Best Answer
It removes them from the GRANT / CREATE statements as per the doc you linked and also per this documentation: Importing and Exporting Databases
Only the
global read lock
is released when the backups are started per the documentation you linked:In other words, the data is read safe but likely still holds other locks preventing the data or schema from being changed during the backup process (aka blocking transactions).
This website goes into good detail on global locks and specifically read locks in MySQL which is relevant to this question: Deep Understanding of MySQL Global Lock and Table Lock
Specifically this part mentions what type of statements are locked:
So yes, technically the data is a snapshot in time because no other transactions are allowed to change the data or schema during the backups. The amount of memory needed is going to be dependent on the amount of data being backed up.