Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Node management functions

BDR uses functions to manage the addition and removal of nodes and related replication control functions. 

The following functions exist to manage nodes:


The function bdr.bdr_subscribe has been removed from BDR. For uni-directional replication, look at the pglogical project project or tools like Londiste.

Node management function examples

These examples show libpq connection strings without a host or hostadd.
To create a BDR group on 'node1':
    SELECT bdr.bdr_group_create(
       local_node_name := 'node1',
       node_external_dsn := 'port=5598 dbname=bdrdemo');
To join 'node2' to BDR group created above:
    SELECT bdr.bdr_group_join(
       local_node_name := 'node2',
       node_external_dsn := 'port=5559 dbname=bdrdemo',
       join_using_dsn := 'port=5558 dbname=bdrdemo');
To remove 'node2' from the BDR group created above:
   SELECT bdr.bdr_part_by_node_names('{node2}');
To see if your node is ready for replication (if you see a NULL result set, your node is ready):
   SELECT bdr.bdr_node_join_wait_for_ready();


Popular posts from this blog

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

7 Steps to configure BDR replication in postgresql

PostgreSQL Monitoring Tools

PostgreSQL pgBadger