Open-source enterprise-class CDC for MySQL ↔ Postgres

Migrate and continuously sync databases between MySQL and Postgres in all four directions — initial snapshot, CDC catch-up, and operator-driven cutover in one tool, opinionated about correctness.

$ go install sluicesync.dev/sluice/cmd/sluice@latest

What you get

Schema-evolution, cutover-priming, and slot-health capabilities usually found only in commercial/enterprise CDC tools — Apache 2.0, a single static binary, no daemon, no SaaS dependency.

🔄 Bidirectional

MySQL → Postgres, Postgres → MySQL, and same-engine in both directions. PlanetScale flavors included.

🔌 Slot-less Postgres sources

Managed Postgres that blocks logical replication (e.g. Heroku) still streams via a trigger-based CDC engine — no replication slot or REPLICATION role required.

🪶 Schema evolution

ADD COLUMN forwards automatically; every other shape refuses loudly with a structured drift diff naming the column that changed.

🩺 Operational telemetry

Pre-emptive slot-health warnings, a source-side heartbeat writer, and a Prometheus /metrics + /readyz endpoint for k8s health checks.

🔁 One-command cutover

sluice cutover primes sequences so the first post-cutover INSERT can't collide on the primary key.

🛑 Loud failure by default

Every silent-loss class has a structured refuse-loudly message with an operator-action recovery hint. Paste it into Slack and the on-call DBA knows what to fix.

Quick start

Install the binary, then run a one-shot migration or start a resumable continuous sync.

# Install
go install sluicesync.dev/sluice/cmd/sluice@latest

# One-shot migration: MySQL → Postgres
sluice migrate \
    --source-driver mysql    --source 'root:rootpw@tcp(localhost:3306)/app' \
    --target-driver postgres --target 'postgres://postgres:pgpw@localhost:5432/app?sslmode=disable'

# Continuous sync: snapshot + CDC catch-up, resumable on restart
sluice sync start \
    --source-driver mysql    --source ... \
    --target-driver postgres --target ... \
    --stream-id myapp-prod

# Cutover-time sequence priming (post-snapshot, pre-traffic-switch)
sluice cutover --config sluice.yaml --cutover-sequence-margin=1000

Three surfaces, independently runnable

sluice is built around three product surfaces — use one, or all three end to end.

Migrate

Schema & data

Read source schema, create target tables, bulk-copy rows, then build indexes and constraints — deferred for fast copy, resumable per-table.

Sync

Change data capture

Snapshot → CDC handoff with resumable checkpoints, schema-drift detection, and slot-health telemetry against quiet sources.

Operate

Run as a service

Long-running sync behind /healthz, /readyz, and /metrics, or one-shot jobs in CI and CronJobs via the container image.