FREEDOM251

Freedom251 › Database Migration Tools

pt-online-schema-change

Free plan LinuxSelf-hosted

Visit pt-online-schema-change Alternatives Pricing

pt-online-schema-change's own site

What pt-online-schema-change is

pt-online-schema-change is a free Percona Toolkit command-line utility for changing MySQL table structures while allowing reads and writes to continue. It builds and fills a copy of the table, then replaces the original. Rows move in small chunks, while triggers carry changes made to the original across during copying. The tool can pause or abort if server load is too high and pause copying when it detects delayed replicas. It does not alter a table unless run with --execute, which cannot be combined with --dry-run. Most tables need a PRIMARY KEY or UNIQUE INDEX, and tables that already have triggers are not supported. Referencing foreign keys require a selected handling method, which adds risk. It runs on Linux and can be self-hosted. Requirements include Perl, DBI, DBD::mysql, MySQL 5.0.2 or newer, and specified MySQL privileges. Percona documents package-manager installation for Debian or Ubuntu and RHEL or CentOS, plus package downloads and a tar.gz release. The toolkit is licensed under GPL version 2 or the Perl Artistic License.

Who it suits

It is aimed at database administrators and database operations teams managing MySQL table changes. It suits operators able to meet its software, privilege, and table-structure requirements.

What it does well

  • Copies rows in small chunks.
  • Can pause for high load or delayed replicas.
  • Does not alter tables without --execute.
  • Free and self-hosted on Linux.

What to know first

  • Most tables need a primary or unique key.
  • Tables with existing triggers are unsupported.
  • Foreign-key handling introduces additional risk.
  • Requires Perl, DBI, DBD::mysql, and MySQL 5.0.2 or newer.

Limits

In most cases, the table needs a PRIMARY KEY or UNIQUE INDEX, and the tool does not work on tables with existing triggers. Foreign keys referencing the table require a specified method, which brings additional risk.

Plans

PlanBilled and limitsPrice
Percona Toolkit (includes pt-online-schema-change)Free, open-source command-line toolkit · GPL v2 or Perl Artistic LicenseFree

As docs.percona.com lists them, read 8 Oct 2026. The maker's own page has the final word.

Getting started

  1. Choose an installation route documented by Percona: a package manager for Debian or Ubuntu or RHEL or CentOS, a package download, or a tar.gz release.
  2. Install Perl, DBI, DBD::mysql, and MySQL 5.0.2 or newer, and ensure the required MySQL privileges are in place.
  3. Prepare a table that in most cases has a PRIMARY KEY or UNIQUE INDEX and does not already have triggers.
  4. Use `--dry-run` to avoid modifying the table, or specify `--execute` to make the change; do not use both options together.

Verdict

pt-online-schema-change provides a chunked approach to MySQL table replacement with load and replica checks. Existing triggers, key requirements, and foreign-key handling can constrain its use, so table conditions matter before execution.

Questions

How much does Percona Toolkit cost?

The listed plan is free.

Is pt-online-schema-change open source?

Yes. It is free software under either the GNU General Public License version 2 or the Perl Artistic License.

Which platforms does it support?

It is listed for Linux and self-hosted use.

What does the tool require?

It requires Perl, DBI, DBD::mysql, MySQL 5.0.2 or newer, and specified MySQL privileges.

Does it support automation?

CI/CD automation is listed as supported.

What happens if a table has foreign keys?

Foreign keys that reference the table require a specified handling method, and that handling introduces additional risk.

Facts from pt-online-schema-change's own pages

Chunked copying
It copies rows in small chunks and uses triggers to apply changes made to the original table during the copy. · docs.percona.com, 8 Oct 2026
Cluster support
For Percona XtraDB Cluster 5.5.28-23.7 and newer, only InnoDB tables can be altered and wsrep_OSU_method must be TOI. · docs.percona.com, 8 Oct 2026
Execution safety
The tool does not modify a table unless the --execute option is specified; --dry-run and --execute are mutually exclusive. · docs.percona.com, 8 Oct 2026
Foreign-key handling
Foreign keys that reference the table require a specified foreign-key method, and their handling introduces additional risk. · docs.percona.com, 8 Oct 2026
Founded
2006 · docs.percona.com, 28 Sept 2026
Installation telemetry
The installer stores an instance UUID for toolkit usage statistics and states that no other information is gathered for that purpose. · docs.percona.com, 8 Oct 2026
Install platforms
Percona documents package-manager installation for Debian or Ubuntu and RHEL or CentOS, plus package downloads and a tar.gz release. · docs.percona.com, 8 Oct 2026
Intended users
Percona describes the Toolkit as advanced open-source command-line tools for DBAs and database operations. · percona.com, 8 Oct 2026
Key requirement
In most cases, the table needs a PRIMARY KEY or UNIQUE INDEX for the tool to operate. · docs.percona.com, 8 Oct 2026
License
The program is free software under either the GNU General Public License version 2 or the Perl Artistic License. · docs.percona.com, 8 Oct 2026
Load and replication checks
It can pause or abort when server load is too high and pause copying when it detects delayed replicas. · docs.percona.com, 8 Oct 2026
Purpose
pt-online-schema-change alters MySQL table structures without blocking reads or writes by building and populating a copy of the table, then replacing the original. · docs.percona.com, 8 Oct 2026
Requirements
The tool requires Perl, DBI, DBD::mysql, and MySQL 5.0.2 or newer, along with specified MySQL privileges. · docs.percona.com, 8 Oct 2026
Support
Percona says its Community Forum service is free and response times vary with the complexity of the question. · docs.percona.com, 8 Oct 2026
Trigger limitation
The tool will not work on a table that already has triggers defined because it uses triggers to keep the replacement table updated. · docs.percona.com, 8 Oct 2026

Where pt-online-schema-change stands on Freedom251

Look at these too