Plan and Validate
The safest pgferry workflow is not “point and pray.” Run a plan first, fix what the report tells you, and only then move data.
Generate a preflight report
Section titled “Generate a preflight report”pgferry plan migration.tomlpgferry plan migration.toml --output-dir hooks --format jsonplan reports the parts of the migration that need manual attention:
- views, routines, and source triggers
- generated columns and unsupported expressions
- unsupported or skipped indexes
- collation warnings
- required PostgreSQL extensions such as
citextor PostGIS
With --output-dir, pgferry also writes hook skeletons you can fill in before the main run.
Use validation during the real run
Section titled “Use validation during the real run”unlogged_tables = falsevalidation = "row_count"resume = truechunk_size = 100000These settings are a strong default for long-running operational migrations:
validation = "row_count"checks source and target table counts after load.resume = truekeeps progress inpgferry_checkpoint.json.unlogged_tables = falsekeeps checkpoints aligned with durable target data.chunk_sizemakes range-based retries cheaper on large tables.
Snapshot strategy
Section titled “Snapshot strategy”Choose the source read mode deliberately:
source_snapshot_mode = "none": fastest and parallel, suitable when the source is static or writes are otherwise controlled.source_snapshot_mode = "single_tx": uses one consistent read-only transaction for MySQL and MSSQL when you need a stable view of a live source database.
SQLite always uses none.
Cutover checklist
Section titled “Cutover checklist”Before the final cutover, verify:
planoutput is understood and any hook SQL is written.- Row counts are acceptable for the tables you care about most.
- Extension-backed features are installed or configured to auto-create.
- Unsupported indexes or generated-column semantics have explicit follow-up notes.
Next step
Section titled “Next step”Use the Reference pages to tune the migration for your source database and operational constraints.