3 ms·
It's not hard to setup initially, but I'll admit that it's not very good. It's not very good in a long-lived scenario where you're changing your replication to
by scurvy 10y ago
It's not hard to setup initially, but I'll admit that it's not very good.
It's not very good in a long-lived scenario where you're changing your replication topology for routine maintenance tasks. Changing from master to replica is easy, but now you have to rebuild that original master off of the former replica now. Completely start over. You can't just start up again from a given transaction ID. MySQL's GTID implementation is much better in this regard. You can change masters and replicas all repoint them without rebuilding. You can't do that (currently) with Postgresql. It's a major pain point.
- sorkin2 10y ago> Changing from master to replica is easy, but now you have to rebuild that original master off of the former replica now. Completely start over. You can't just start up again from a given transaction ID. MySQL's GTID implementation is much better in this regard. You can change masters and replicas all repoint them without rebuilding. You can't do that (currently) with Postgresql. Have you heard of pg_rewind? https://www.postgresql.org/docs/current/static/app-pgrewind.html https://www.postgresql.org/docs/current/static/app-pgrewind....
- scurvy 10y agoI had not. Looks like it requires 9.5 or later? We're running 9.4 so we'll have to upgrade to use it. Thanks!
- mb4nck 10y agoYou can get pg_rewind for 9.4 (and 9.3 in its branch) here: https://github.com/vmware/pg_rewind/tree/REL9_4_STABLE https://github.com/vmware/pg_rewind/tree/REL9_4_STABLE It's from the people who wrote it upstream, they provide the code there for earlier Postgres releases.
- scurvy 10y agoDoes this help at all with upgrades? Upgrading from 9.4 to 9.5 means you need to rebuild your entire replication topology because the master's identifier has changed (in the initdb step of the official docs).