Gradual database migration: PostgreSQL to MariaDB without downtime
A gradual database migration moves tables one at a time while applications keep working. With Otterstax, services connect to one endpoint, Otterstax keeps the old and new databases in sync with CDC, and each table switches over without code changes or a long maintenance window.
Gradual database migration
- Situation
- A fintech company with 80–100 TB on PostgreSQL estimated its database upgrade at 2 years (8 quarters).
- With Otterstax
- Services switched to Otterstax without code changes. Tables moved to MariaDB one by one, about 2–4 weeks each, with Otterstax keeping both databases in sync. The team rewrote queries for MariaDB on its own schedule.
Migration demo
mysql://app@otterstax:8816unchangedSELECT u.country, COUNT(o.id) AS orders, SUM(o.total) AS revenue
FROM orders o
JOIN users u ON u.id = o.user_id
GROUP BY u.country
ORDER BY revenue DESC; | country | orders | revenue |
|---|---|---|
| US | 1,284 | 184,920.40 |
| DE | 702 | 96,311.75 |
| GB | 518 | 71,048.10 |
| FR | 391 | 52,776.00 |
| NL | 233 | 31,502.65 |
Your data lives in multiple data sources. Your code holds them together.
Nobody plans a multi-source stack — it just grows. And every new feature pays for it.
Migrations that take quarters.
Moving a table from PostgreSQL to MariaDB or ClickHouse means changing every service that touches it. Teams postpone the migration, and the old database keeps growing. In one fintech case the upgrade was estimated at 2 years (8 quarters).
to migrate a database
Before / After
Before
- 3 database drivers in every service
- nightly ETL jobs
- sync scripts between data sources
- analytics on data that is hours old
- migration = rewrite every service
After • with Otterstax
- 1 connection string
- queries run in place
- writes go to the right database
- fresh data in seconds
- migrate table by table
Less infrastructure. Faster delivery. No lock-in.
migration TCO
faster time-to-market
After a PostgreSQL → MariaDB migration run through Otterstax. Fintech, 80–100 TB. Effect of the whole migration, including MariaDB itself. Source: mariadb.org
Incremental
Adopt it one service at a time. Check the results first, then retire the pipelines and subscriptions you no longer need.
Enterprise capabilities
CDC with guarantees
Change data capture and dual writes with delivery guarantees, running in a cluster. Open source has CDC without guarantees.
CDC and dual writes — Open Source: No guarantees · Enterprise: With guarantees, in a cluster. Compare open source and Enterprise →
CDC, dual writes and gradual migration — Otterstax: ✓ · Trino: — · Spice.ai: CDC for acceleration only. See all comparisons →
Try it on your stack for 2 weeks.
- 1
We map your data sources and pick one use case.
- 2
We run Otterstax next to your current setup, and nothing is switched off.
- 3
We check agreed success criteria together.
Four ways to migrate a database
Big bang, replica and cutover, dual writes in the application, or table by table through a federated query engine: downtime, rollback and app changes compared.
How long does a typical rollout take?
Migrations go table by table, about 2–4 weeks per table, without a long maintenance window. In the MariaDB case, an upgrade estimated at 2 years took one year.
Does Otterstax copy my data?
No. Otterstax doesn't store your data: queries run where the data lives, and only the rows a query needs pass through. You can turn on caching for heavy analytical queries. During a migration, data moves straight from the old database to the new one, and Otterstax keeps them in sync with CDC until you switch over.
Do I need to change my application code?
No. Your app connects with its existing MariaDB / MySQL or PostgreSQL driver or ORM. You only change the connection string. Otterstax translates part of the SQL for the target database and passes database-specific SQL through as is.
Is it production-ready?
Yes. The largest public case is a fintech company with 80–100 TB on MariaDB, about 1 million queries a day and up to 10 million during promotions. Some deployments are larger.
Use cases: cross-database joins, analytics without ETL, ML in SQL, database migration
One app, many data sources
Analytics without ETL
ML in SQL: real-time fraud detection
See Otterstax on your own data sources
In a 30-minute call we'll map your stack and show a working query across your data sources.