// the find
shayonj/pg_easy_replicate
Easily setup logical replication and switchover to new database with minimal downtime
A CLI orchestrator that automates the tedious parts of PostgreSQL logical replication setup and blue/green switchover between a source and target database. It's aimed at teams doing major version upgrades, cloud migrations, or database moves who want sub-minute cutover instead of a maintenance window.
It covers the whole lifecycle, not just CREATE PUBLICATION/SUBSCRIPTION boilerplate: bootstrap, sync, stats polling, and switchover are all separate commands with real state tracking in Postgres tables. DDL change tracking via event triggers is a genuine value-add since logical replication silently ignores schema changes - most homegrown scripts miss this entirely. It drops indices before the initial copy and recreates them concurrently before switchover, which is the kind of detail people usually learn the hard way on a large table. It's reportedly running in production at Tines and ships CI plus a dedicated smoke-test workflow against real Postgres instances, not just unit tests with mocks.
It wants SUPERUSER (or a broad special role with ADMIN OPTION on PG16+) on both databases, which is a large trust boundary for a tool whose whole pitch is de-risking migrations. DDL changes are tracked but not auto-applied - you have to run apply_ddl_change by hand, so mid-migration schema drift still needs a human watching. The actual traffic cutover (rolling restart, DNS failover) is explicitly out of scope - the README just describes strategies, you have to build that automation yourself. And it can't escape Postgres's own logical replication restrictions (no large objects, sequences not synced automatically, no DDL replication at the protocol level), so anyone skimming the pitch without reading that linked doc will get surprised.