Questions tagged [postgresql-bdr]

Bi-Directional Replication (BDR) PostgreSQL extension to enable asynchronous multi-master replication.

BDR (Bi-Directional Replication for PostgreSQL) is a PostgreSQL extension that adds support for asynchronous multi-master replication.

Applications written for PostgreSQL will generally require changes before they can safely operate with multiple write masters under BDR.

BDR is eventually consistent, though it ensures constraints and foreign keys are always consistent within any given node. There is no global lock manager or global transaction manager. Row and relation locks on one node are not replicated to other nodes.

No external ticker or replay daemon(s) are required to manage replication. No triggers are required. DDL is performed directly on the target node and replicated to other nodes without external tooling. There's no central control server, and the system is tolerant of latency and temporary partitions.

BDR provides global sequence generation, selective replication, user-defined conflict resolution handlers, and a number of other features to ease application design.

It's generally safe to run an application on BDR if it's configured to only write to one node though; this uses BDR much like a streaming replica but without the issues with query cancellation, temp tables, etc that normal streaming replication encounters.

14 questions
2
votes
1 answer

postgresql bdr 0.8.x - adding another downstream server only partially works

I have the following postgresql 9.4 bdr setup: upstream server with db called "bdrdemo" running on 10.1.1.1 downstream server(1) with db called bdrdemo running on 10.2.2.2 (replicates with 10.1.1.1) downstream server(2) with db called "newname"…
2
votes
1 answer

postgresql 9.4 + BDR Fails

I'm trying to get postgresql 9.4 and BDR working. Following this tutorial: https://wiki.postgresql.org/wiki/BDR_Quick_Start Actually, my sysadmin provided me with a package to test with. He's taken care of the compilation "stuff". I have two…
Happydevdays
  • 355
  • 1
  • 2
  • 9
2
votes
1 answer

Can bdr only replicate one database per server?

I have installed the new BDR-Solution with PostgreSQL 9.4 and it works like a charm. My Problem: I want to add more databases to the replication but every time if I added the other database and restarted the servers one server is crashing.…
2
votes
1 answer

Ensuring Postgresql BDR replication

My understanding, reading between the lines, is that BDR replicates row by row, starting after the COMMIT. I have a requirement to be able to then wait until some nodes have actually replicated my latest commit. If not, I will report the problem…
Tuntable
  • 143
  • 5
1
vote
0 answers

BDR error :ERROR: could not open extension control file

BDR error : when making changes to the postgresql.conf for shared_preload_libraries = ’pglogical,bdr’ ``FATAL: could not access file "pglogical": No such file or directory``` also cannot make extension postgres=# create extension BDR; ERROR: …
Prabhat
  • 121
  • 1
  • 5
1
vote
0 answers

Postgresql BDR - What causes replication_slots to go inactive?

I'm trying to hunt down what causes replication slots to go inactive. Might seem like a remedial question but I'm noticing that on my master database server, I have many inactive replication slots that are taking up some space on the disk. I know I…
dot
  • 781
  • 5
  • 11
  • 22
1
vote
1 answer

How to Loadbalance a Postgres BDR Cluster

I'm planning to use BDR (by 2ndQuadrant) to setup a multi master cluster for my PostgreSQL Databases. how can i achieve real loadbalancing for read and write Operations? I dont want to do it on the application side. Is it a good idea to combine…
RootOfProblem
  • 245
  • 2
  • 9
1
vote
1 answer

Postgresql BDR Update Update conflict detection

Apparently only the new values of rows are sent between nodes on update. So how can there ever be detectable conflict? Node A receives an update from Node B, and a different update from node C. How can A know that there was a conflict? That the…
Tuntable
  • 143
  • 5
1
vote
1 answer

Postgresql BDR problem compiling pluging

I'm trying to build deb packages for postgresql BDR plugin, but I'm getting the following error: gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security…
Eloy Coto
  • 41
  • 4
1
vote
1 answer

Postgres Row Level Security and BDR

I am implementing a multi tenant web app using postgres. I want to use Row Level Security (RLS ) for data separation. RLS is available from PG version 9.5. However, at the same time, the HA / DR teams plan to use BDR ( Bi directional replication)…
1
vote
0 answers

BDR Replication issue

I am trying to setup 2-node BDR replication and i am getting the following error while running bdr_init_copy. /usr/pgsql-9.4/bin/bdr_init_copy -d "host=10.10.145.111 dbname=apimgtdb port=5432" -U postgres --local-dbname="host=10.10.145.110…
0
votes
0 answers

How to use exclusion constraints with Postgres BDR

Looks like BDR doesn't support exclusion constraints... However, I'm using exclusion constraints to achieve the same result as a unique constraint (but using a hash index instead of a B-Tree): alter table my_table add constraint my_table_unique_hash…
Elifarley
  • 101
  • 2
0
votes
1 answer

2ndQuadrant BDR installation not working anymore

I previously used the following to install BDR (9.4) on Ubuntu: echo "deb http://packages.2ndquadrant.com/bdr/apt/ trusty-2ndquadrant main" > "/etc/apt/sources.list.d/2ndquadrant.list" wget --quiet -O -…
0
votes
1 answer

Procedure to replace a BDR server

I have set up a 2-node PG 9.4 system with BDR. Replication works great. Now, let's suppose that one of the two nodes needs to be replaced. In fact, let's be more specific. Let's say that the node on which I ran the command to create the group :…
Huy Vu
  • 1
  • 2