We recently tried pt-online-schema-change to add a column to a table. It worked mostly as expected but one thing puzzles me: in case the account we use to do the migration doesn't have the DELETE permission, our application (which keeps running simultaneously) gets errors that say "DELETE command denied to user 'pt'@'localhost' for table '_xxx_new'" when the app is performing an insert on the xxx table.

My understanding is that the triggers are to do inserts to the destitation _xxx_new table when a new record is inserted in the source xxx table. How come it may fail with not having a DELETE permission??

Percona docs are pretty generic on this and no googling helped, so will be thankful for any ideas!


The issue turned out to be that the triggers that the pt-online-schema-change tool creates for insert and update use the REPLACE DDL command of MySQL, which requires the DELETE permission to execute.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.