Comment 4 for bug 1368244

Revision history for this message
Valerii Kravchuk (valerii-kravchuk) wrote : Re: pt-online-schema-change --alter-foreign-keys-method=drop-swap is not atomic

I think what Marcos described:

"What should be done here is make the operation "atomic" in the sense that it can not be interrupted (if the RENAME TABLE fails then it can't be atomic because we can't rollback the DROP TABLE).

So the suggested fix is: wrap the drop_swap handling code with alternative signal handler which will refuse to exit at the critical time between drop and rename.

And for scripters out there: use "disown" instead of "nohup" to avoid most signals getting there."

is a reasonable feature request. Confirming it as such.