Upgrading Postgres Major, and Django Model with Logical Replication
tr3s.ma·13h·
Discuss: Hacker News
Flag this post

Logical Replication can be more flexible than it seems.

November 15, 2025 - 6 mins read

Series: Postgres

The story

A customer needed to upgrade their Aurora RDS Postgres from v13 to v16 due to v13’s EOL. This is a common requirement, and so far, a straightforward process. The complexity arose when they needed to upgrade their application model, which was taking a long time to run due that most of the tables required a full rewrite.

The Django migration was taking several hours to run, which made a blue/green upgrade and subsequent migration execution unfeasible due to the long downtime it would incur.

So, we decided to try a more sophisticated approach:

  1. Create an empty schema with the migration already applied in a v16
  2. Add the …

Similar Posts

Loading similar posts...