May 2018
Intermediate to advanced
576 pages
30h 25m
English
In PostgreSQL 10, some aspects of LSR have been included with the core server. The same idea of publish and subscribe has been included as commands, allowing these to be dumped and restored between servers.
Let's look at the same examples as we saw earlier:
CREATE PUBLICATION pub_nodeA_postgres_all FOR ALL TABLES;
And then immediately copy all table data and then subscribe to changes from the default replication set on the nodeA database postgres, by issuing the following command on nodeB:
CREATE SUBSCRIPTION sub_nodeA_postgres_allCONNECTION ‘conninfo’PUBLICATION pub_nodeA_postgres_all;