SOF --:--NYC --:--

~/cases/oracle-to-postgresql-migration

professional, anonymized

Migrating a production database from Oracle to PostgreSQL

A staged migration with continuous replication, a reversible cutover, high availability and tuned queries.

diagram
Continuous replication keeps PostgreSQL in sync until a staged, reversible cutover.beforeafter cutoverOraclesource databaseSymmetricDScontinuous replicationPostgreSQLtarget, HA failoverAround the databasebackups, replicationquery tuningApplicationsstaged, reversiblecutover
Continuous replication keeps PostgreSQL in sync until a staged, reversible cutover.

NOTE: a generalized write-up of a problem class I have worked on. Client names, data and internal details are omitted on purpose.

Context

An enterprise platform ran on a commercial database. The goal was to cut licensing cost and gain deployment flexibility without risking the data.

Constraints

  • Near-zero downtime for the cutover.
  • Strict data integrity, with a tested way to roll back.
  • Application behaviour had to stay the same for users.

Decision

Use continuous replication with SymmetricDS instead of a one-shot dump and restore. The PostgreSQL instance stayed in sync with the source while the schema, queries and application code were adapted and tested against it. The cutover then happened in stages, once the data matched.

Trade-offs

  • Replication adds moving parts and needs monitoring during the migration window.
  • Differences in data types and SQL dialect needed careful testing.
  • In return, the switch was short and reversible.

What I built around the database

  • A high-availability failover design.
  • Automated backup strategies.
  • Data replication for resilience.
  • Query performance optimisation under real workloads.

Outcome

PostgreSQL runs in production as the core database of enterprise applications, with failover, backups and replication managed as part of the platform.

What I would stress

Rehearse the cutover and the rollback several times, and compare source and target data automatically instead of by eye.

$ facing something similar?