pgferry
CI-tested sources
MySQL 5.7, 8.0 and latestMariaDB 10.6 and latestSQLiteMSSQL 2017, 2019, 2022, and 2025Real migrations, no surprises
Introspects your source schema, creates matching PostgreSQL tables, and streams data, then adds keys, indexes, foreign keys, sequences, and triggers after the load.
For most migrations, that covers the entire pipeline end to end. When something can’t be migrated automatically, views, routines, generated-column expressions, or unsupported index types, pgferry plan tells you before any data is touched.
Two valid approaches, both easy
Section titled “Two valid approaches, both easy”Both are a single config file. Fast is great for dev iterations and works fine for production when you can afford to re-run from scratch. Safe adds crash recovery and validation for when you cannot.
Fast
schema = "app"on_schema_exists = "recreate"
[source]type = "mysql"dsn = "root:root@tcp(127.0.0.1:3306)/source_db"
[target]dsn = "postgres://…/target_db?sslmode=disable"Drops the target schema, skips WAL logging, and optimizes for speed. Ideal for disposable dev or staging targets you rebuild often.
Safe
schema = "app"on_schema_exists = "error"unlogged_tables = falseresume = truevalidation = "row_count"
[source]type = "mysql"dsn = "root:root@tcp(127.0.0.1:3306)/source_db"
[target]dsn = "postgres://…/target_db?sslmode=disable"Refuses to overwrite existing schemas, keeps WAL logging for crash safety, checkpoints progress, and validates row counts after the load.
Highlights
Section titled “Highlights”- No runtime dependencies or extra tooling to install.
- Interactive
pgferry wizardthat can generate, plan, and start a migration in one flow. - Fast parallel
COPYloads with range-based chunking for large tables. - Clear stage and row-copy progress logs, so long runs do not look frozen.
- Preflight
planreports views, routines, triggers, generated columns, skipped indexes, semantic-drift warnings, orphan-cleanup candidates, required extensions, collation warnings, and copy-risk ETA ranges before PostgreSQL is touched. - Resumable chunked migrations, so failures do not send you back to zero.
- Consistent-snapshot mode for migrating live source databases safely.
- Built for messy real-world schemas with hooks, orphan cleanup, generated-column reporting, and unsupported-index warnings.
schema_onlyanddata_onlyruns when you need tighter control.- Extension-backed features like
citextand PostGIS, with validation and optional auto-create. - Post-load validation modes that range from fast
row_countchecks to stronger boundedsampled_hashcontent checks.