This looks like a great tool, but it's also a sour reminder that replication still feels a lot like open heart surgery on postgresql. Why can't we just type "enslave 10.0.0.2" into psql and have the computer do the hard work? The machinery is "almost there" for a half a decade now. Who do we have to bribe (wink wink, nudge) to bring the UX into a state where crutches like pg_rewind are not needed?
A thing people consistently seem not to get when bitching about PostgreSQL (streaming) replication is that, by design, it's slave pulls instead of master pushes . There are Very Good Reasons for that. And it's really not that hard. MVPRC (Minimum Viable PostgreSQL Replication Configuration): Master: postgresql.conf: wal_level = 'hot_standby' max_wal_senders = N pg_hba.conf: host replication all A.B.C.D/E md5 Slave: p…
Which is six lines too many for what is inherently a runtime configuration that shouldn't be mentioned in any config file at all.
Then you use pg_basebackup, and start the slave.
I take it you don't care for failover and monitoring then?
Otherwise you would have mentioned either repmgr and pgpool here, or your conglomerate of rather complex homegrown scripts to mimic their functionality.