Percona XtraBackup 8 Enables --lock-ddl by DefaultPercona XtraBackup 8.0.23 enables the “lock-ddl” option by default to ensure any DDL events do not corrupt the backups. Any DML events continue to occur, and only DDL events are blocked.

A DDL lock protects the definition of tables and views. With the “–lock-ddl” option disabled, Percona XtraBackup allows backups while concurrent DDL events continue to happen. These backups are invalid and fail at the Prepare stage. If DDL events have occurred without the backup user’s knowledge, they may be unaware the backup is corrupt.

MySQL 8.0 introduced “Lock Instance for Backup”. This backup lock is lightweight, and the performance for DML operations is almost the same with or without backup locks. This lock is not available in 5.7, because Percona Server for MySQL has its own lightweight backup lock for that version.

Percona XtraBackup 8 also has “Lock Tables for Backup”. An active “Lock Tables for Backup” metadata lock (MDL) blocks all DDL statements and updates to MyISAM, CSV, MEMORY, ARCHIVE, TokuDB, and MyRocks tables. The PERFORMANCE_SCHEMA or PROCESSLIST displays “Waiting for backup log” when this lock is active.