Principle
- Copy the structure of source table
- Alter schema of the new temp table
- Copy all data from the source table to the temp table
This behaviour is the same as default MySQL altering. The difference is in locking:
- Default MySQL altering locks the source table in the begining
- Percona Toolkit instead of locking creates triggers on the source table which will update data in the temp table when performing the whole alter.
Two excluding requirements - don't lock te source table, but ensure the data consistency.
Replications
For preserving data consistency it requires row-based replication (which replicates data states instead of statements), because toolkit is based on triggers and replications does not replicate triggers.
It is possible to switch to row-based replication temporarily.
Replications and triggers http://dev.mysql.com/doc/refman/5.1/en/replication-features-triggers.html
Source: http://www.percona.com/doc/percona-toolkit/2.1/pt-online-schema-change.html