Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Enabling BDR in SQL sessions for both of your nodes/instances

On the first node/instance in database "bdrdemo" as postgreSQL superuser, create the extensions necessary for BDR:
    psql -p 5598 -U postgres bdrdemo

       CREATE EXTENSION btree_gist;
       CREATE EXTENSION bdr;    
Then you run a function that identifies a BDR group that delineates a connection string for other nodes to communicate with (for the first node, we will use port 5598) from the same SQL session as above on port 5598:
    SELECT bdr.bdr_group_create(
      local_node_name := 'node1',
      node_external_dsn := 'port=5598 dbname=bdrdemo host=localhost'
);    
To ensure that the node is ready to replicate, run this function from the same SQL session as above on port 5598:
    SELECT bdr.bdr_node_join_wait_for_ready();    
On the second node/instance on port 5599 in database "bdrdemo" as postgreSQL superuser, create the extensions necessary for BDR:
    psql -p 5599 -U postgres bdrdemo

       CREATE EXTENSION btree_gist;
       CREATE EXTENSION bdr;    
Then run a function that joins this node/instance to your BDR group you created above (for the second node, we will use port 5599) from the same SQL session as above on port 5599:
    SELECT bdr.bdr_group_join(
      local_node_name := 'node2',
      node_external_dsn := 'port=5599 dbname=bdrdemo host=localhost',
      join_using_dsn := 'port=5598 dbname=bdrdemo host=localhost'
);
To ensure that the node/instance is ready to replicate, run this function from the same SQL session as above on port 5599:
    SELECT bdr.bdr_node_join_wait_for_ready();

Comments

Popular posts from this blog

ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated ORA-01262: Stat failed on a file destination directory Linux-x86_64 Error: 2: No such file or directory

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

PostgreSQL Database startup / shutdown /restart

PostgreSQL Pgbadger Installation On Linux

PostgreSQL pgBadger