Best practices for zero-downtime DB migrations in Postgres?
We're planning to migrate a production Postgres 14 instance with ~500M rows across multiple tables. Current approach: dual-write during transition, then backfill historical data, then switch reads. But we've seen lock contention issues during the backfill phase (especially with HOT updates blocked on certain tables). How are others handling this? Are you using logical replication, pg_cron for chunked backfills, or something else? Would love to hear what's actually worked in production vs. what looked good on paper.