Adding node to bdr group

Started by Cj Bover 10 years ago2 messagesgeneral
Jump to latest
#1Cj B
blackc2004@gmail.com

Hi there, I want to add another node to my BDR group and was wondering what
the best practice is. My database is about 4gb. Current servers on west
coast and new server is on east coast.

Can I just do a bdr.bdr_group_join
<http://bdr-project.org/docs/stable/functions-node-mgmt.html#FUNCTION-BDR-GROUP-JOIN&gt;?
Just want to confirm what the best practice is as I haven't seen anything
in the documentation about this.

#2Craig Ringer
craig@2ndquadrant.com
In reply to: Cj B (#1)
Re: Adding node to bdr group

Can I just do a bdr.bdr_group_join

<http://bdr-project.org/docs/stable/functions-node-mgmt.html#FUNCTION-BDR-GROUP-JOIN&gt;?
Just want to confirm what the best practice is as I haven't seen anything
in the documentation about this.

Yes, you can just do a bdr.bdr_group_join (
http://bdr-project.org/docs/stable/functions-node-mgmt.html) on the new
node, specifying the dsn of either existing node, just like you did when
creating the first node.

Alternately, you can use bdr_init_copy (
http://bdr-project.org/docs/stable/command-bdr-init-copy.html) to do a
clone of the whole database installation and bring it up as a new peer.
Note that this will copy other non-BDR databases too, since it does a
pg_basebackup and pg_basebackup doesn't have any facility for
including/excluding individual databases. This can be a better option for a
big database.

In either case if the new node join fails for any reason you must make sure
to manually remove the replication slots created on either/both existing
nodes to prevent WAL from accumulating until they run out of disk space.

On 16 January 2016 at 02:45, Cj B <blackc2004@gmail.com> wrote:

Hi there, I want to add another node to my BDR group and was wondering
what the best practice is. My database is about 4gb. Current servers on
west coast and new server is on east coast.

Can I just do a bdr.bdr_group_join
<http://bdr-project.org/docs/stable/functions-node-mgmt.html#FUNCTION-BDR-GROUP-JOIN&gt;?
Just want to confirm what the best practice is as I haven't seen anything
in the documentation about this.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services