6 ms·
> that feature could also allow for a fairly straightforward way to move data from a running instance to a new one That's already relatively straightforward wi
by twic 13y ago
> that feature could also allow for a fairly straightforward way to move data from a running instance to a new one
That's already relatively straightforward with PostgreSQL's existing replication. This has worked since 9.1:
http://www.rassoc.com/gregr/weblog/2013/02/16/zero-to-postgresql-streaming-replication-in-10-mins/ http://www.rassoc.com/gregr/weblog/2013/02/16/zero-to-postgr...
It involves bouncing the master, but it doesn't involve extended downtime. Or is that not what you meant?
However, the 'logical log streaming replication' that is being implemented looks even better. A small but useful thing is that it works at database granularity, rather than having to replicate the whole installation. The huge thing is that because it works with logical rather than physical representations of changes, it allows replication into a database which is also being updated locally - slaves can be read/write rather than read-only. That itself is not immediately exciting, but the logical consequence of this is that two databases can both accept changes and replicate to each other - 'bi-directional replication', or what in MySQL is called 'multi-master replication'. The holy grail of database clustering!
- bostik 13y ago> The holy grail of database clustering! Thank you for pointing this out, I would have missed it.In fact, thank you everyone who has answered with helpful technical details. I have a couple of use-cases in mind where logical streaming replication could solve a number of problems. A personal project would benefit from a database-level setup due to easier data migration, a professional one would benefit from bi-directionality and logically straightforward clustering. (I also have some future designs in mind where replicating only subsets of a database would be VERY useful.) Owing thanks to the replies, I now have some extra reading to do. :)