# Pt Online Schema Change Percona Toolkit

> Executes online non-blocking MySQL table alterations using Percona Toolkit pt-online-schema-change. Use when altering schema on production MySQL instances witho

- Skill: `bishnucd/pt-online-schema-change-percona-toolkit` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx get-skill add bishnucd/pt-online-schema-change-percona-toolkit`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bishnucd/pt-online-schema-change-percona-toolkit/raw
- Safety review: pending
- Works with: any agent that reads SKILL.md (Claude Code, Claude.ai, Cursor, Codex, Windsurf, 60+ more)
- Category: Coding & Dev Tools
- Author: Bishnucd (https://skillmd.com/u/bishnucd)
- Updated: 2026-12-02
- Page: https://skillmd.com/skills/bishnucd/pt-online-schema-change-percona-toolkit

---

---
name: pt-online-schema-change-percona-toolkit
description: Executes online non-blocking MySQL table alterations using Percona Toolkit pt-online-schema-change. Use when altering schema on production MySQL instances without blocking reads or writes.
license: MIT
metadata:
  author: Community List Maintainers
  version: "1.0.0"
  source: "https://docs.percona.com/percona-toolkit/pt-online-schema-change.html"
---
# Pt Online Schema Change Percona Toolkit

## Overview
pt-online-schema-change creates a duplicate empty table, creates triggers to capture live updates, copies existing rows in micro-batches, and swaps tables atomically.

## Operational Workflow

1. **Dry-run migration command using --dry-run flag to validate table locks and foreign keys.**:
   - Dry-run migration command using --dry-run flag to validate table locks and foreign keys.

2. **Specify --chunk-size and --max-lag thresholds to throttle copying during peak traffic.**:
   - Specify --chunk-size and --max-lag thresholds to throttle copying during peak traffic.

3. **Execute live alteration command with --execute flag.**:
   - Execute live alteration command with --execute flag.

4. **Verify trigger cleanup and successful table promotion.**:
   - Verify trigger cleanup and successful table promotion.

## Recommended Tools & Environments
- Percona Toolkit
- pt-online-schema-change
- MySQL
- Triggers

## Verification & Execution Criteria
- Pre-execution validation verifies all prerequisites and inputs.
- Step-by-step progress logging confirms intermediate state transitions.
- Post-execution checks verify output integrity and clean exit codes.

