February 2020
Intermediate to advanced
734 pages
38h 13m
English
One difficulty associated with using the bdr.join_node_group function is that it relies on PostgreSQL logical replication semantics to transfer data from the remote node. The associated overhead makes this a fairly slow process, and for larger databases may mean days or even weeks of data synchronization. Assuming a single function call can survive for that long is a very risky proposition.
As a result, BDR also provides a command-line tool that can convert a physical replica into a BDR node. Using the same node DSNs and names as in the recipes, converting pgha2 would work like this:
bdr_init_physical -D /db/pgdata \ --node-name=tokyo \ --remote-dsn='dbname=myapp host=pgha1 user=bdr_user' \ --local-dsn='dbname=myapp host=pgha2 ...
Read now
Unlock full access