How it works...
Creating our first node basically consists of three steps. We start by creating the bdr PostgreSQL extension using the CASCADE keyword. This also creates the pglogical extension required for BDR to function. Alternatively, we could create the pglogical extension explicitly before doing the same for bdr. Either way, the presence of the extensions provides us with a wealth of function calls and metadata for building and introspecting our BDR cluster.
The second step is the creation of the node itself. Every BDR node definition is a pair comprised of a name and a connection DSN, both of which we set by supplying them to the bdr.create_node function. The node name must be unique across the cluster, so we recommend choosing something ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access