Not the answer you need?
Register and ask your own question!

"Waiting for backup lock" & partitioned innodb tables

zImagezImage EntrantCurrent User Role Beginner
https://www.percona.com/doc/percona-xtrabackup/2.3/intro.html says:
It supports completely non-blocking backups of InnoDB, XtraDB, and HailDB storage engines. In addition, it can back up the following storage engines by briefly pausing writes at the end of the backup: MyISAM, Merge, and Archive, including partitioned tables, triggers, and database options.

Which makes me think partitioned tables can't be backed up in a lock free manner currently. I did the following simple experiment to test my understanding:
CREATE TABLE test1 (`id` int(10), PRIMARY KEY (`id`)) ENGINE=InnoDB PARTITION BY KEY (id) PARTITIONS 2;
INSERT INTO test1 VALUES (1);
LOCK TABLES FOR BACKUP;
EXPLAIN   DELETE FROM `test1` WHERE `test1`.`id` = 1;

SHOW PROCESSLIST;

| Id    | User | Host      | db      | Command | Time | State                   | Info
+-------+------+-----------+---------+---------+------+-------------------------+------------------------
| 67362 | root | localhost | billing | Query   |    4 | Waiting for backup lock | DELETE FROM `test1` ...
So, is my setup somehow broken or xtrabackup doesn't currently allow DML statements against partitioned innodb tables?

This is percona mysql server 5.6.27-75.0.

Best rgerads,
Teodor Milkov
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.