Description:
Feature request:- In addition to the current function (locking a whole database's tables at once, copying the tables individually, unlocking all the tables at once), could we have mysqlhotcopy lock/copy/unlock each table individually?
ie
mysqlhotcopy DatabaseName -justintimelocking
Procedure:-
for each table in DatabaseName
lock the table
copy the table
unlock the table
next table in DatabaseName
Mysqlhotcopy is promoted that it can be run on a live/running server. By mysqlhotcopy locking a whole series of tables at the beginning of the copying procedure, the locked tables cannot be updated ... and that can be quite a long time if the table-actually-being-copied is very large. This situation can create stress on the server whilst it's queuing up threads waiting for tables to be locked.
Adding an option so that each table is locked only when it is able to be actually copied would help in this common situation.
Thanks.
How to repeat:
Not applicable
Suggested fix:
Add option to alter locking/copying procedure...
mysqlhotcopy DatabaseName -justintimelocking
Procedure:-
for each table in DatabaseName
lock the table
copy the table
unlock the table
next table in DatabaseName
Description: Feature request:- In addition to the current function (locking a whole database's tables at once, copying the tables individually, unlocking all the tables at once), could we have mysqlhotcopy lock/copy/unlock each table individually? ie mysqlhotcopy DatabaseName -justintimelocking Procedure:- for each table in DatabaseName lock the table copy the table unlock the table next table in DatabaseName Mysqlhotcopy is promoted that it can be run on a live/running server. By mysqlhotcopy locking a whole series of tables at the beginning of the copying procedure, the locked tables cannot be updated ... and that can be quite a long time if the table-actually-being-copied is very large. This situation can create stress on the server whilst it's queuing up threads waiting for tables to be locked. Adding an option so that each table is locked only when it is able to be actually copied would help in this common situation. Thanks. How to repeat: Not applicable Suggested fix: Add option to alter locking/copying procedure... mysqlhotcopy DatabaseName -justintimelocking Procedure:- for each table in DatabaseName lock the table copy the table unlock the table next table in DatabaseName