This document outlines the high-level plan for performing a zero‑downtime migration from an on‑premises PostgreSQL 11 database to Amazon RDS PostgreSQL 14 using logical replication and ProxySQL. It is designed for planning and Confluence use.
The goal is to migrate a large PostgreSQL 11 database to RDS PostgreSQL 14 without interrupting application writes. This is achieved by restoring a consistent snapshot, enabling logical replication, continuously syncing changes, and performing a controlled cutover using ProxySQL.
Create RDS PostgreSQL 14 instance.
Enable logical replication via parameter group.
Configure networking to allow inbound connections from the on‑prem PG11 system.
Create the target database and required schemas.
Ensure logical replication settings are enabled.
Configure replication user and pg_hba rules.
Create publication for required tables or schemas.
Deploy ProxySQL in front of the application.
Route all database connections through ProxySQL.
Prepare routing rules for the future cutover.
Create a consistent snapshot using a repeatable‑read transaction.
Perform a schema-only dump.
Perform a data dump from the snapshot.
Writes continue normally during the entire process.
Restore schema into RDS.
Restore data into RDS.
Validate basic structure and row counts.
Create a subscription on RDS for the PG11 publication.
Allow RDS to replay all changes since the snapshot.
Maintain replication until lag approaches zero.
Validate replication performance and stability.
Verify schema alignment.
Perform read-only testing against RDS through ProxySQL.
ProxySQL drains existing write connections.
New write connections are routed to RDS.
Ensure replication catch-up reaches zero.
Disable subscription on RDS.
Keep PG11 in read-only mode temporarily for fallback.
Monitor application behavior on RDS.
Decommission logical replication.
Retain PG11 in read-only mode for a short fallback window.
Fully retire PG11 when stable.
No write downtime required at any stage.
Large databases supported through snapshot + logical sync.
Controlled cutover with instant rollback capability.
ProxySQL ensures smooth connection draining and switching.
PG11 remains operational until final validation.
Infrastructure: RDS provisioning, networking, parameter groups.
Database Operations: Snapshot creation, restore process, logical replication setup.
Application Team: ProxySQL integration and cutover readiness.
SRE / Ops: Monitoring, fallback planning, final validation.
Migration executed with zero application downtime.
All real-time writes from PG11 copied into RDS via logical replication.
Seamless cutover with ProxySQL managing write routing.
Clean fallback path until final sign‑off.
Schema compatibility must be maintained during the entire process.
Sequences will require alignment post‑cutover.
Long‑running PG11 transactions must be monitored to avoid WAL retention issues.
This plan can be expanded into detailed operational runbooks, SOPs, and checklists as needed.