Saturday, June 24

When to use Postgres-BDR or Postgres-XL?

The right answer is of course “Use PostgreSQL”. It’s the main distro and we want you to use that as often as possible.

The Postgres-BDR and Postgres-XL projects are also fully open source projects, using the same copyright and licence as the main PostgreSQL project. So if you’re using PostgreSQL, they are also options to consider if you want extended functionality.

What does Postgres-BDR do? BDR allows you to have a widely distributed cluster of nodes that give you multiple full copies of a database. So you can have copies of the database in London, New York, San Francisco, Rome, Dubai, New Delhi, Hong Kong, Tokyo, Sydney, São Paulo, Buenos Aires and Johannesburg. And all your customers in those places get fast access for read AND write to the database. As long as your application doesn’t update the same data in two different places at once, you’re fine. If it does, then you probably need to rethink what you’re trying to do, but we do provide a conflict resolution scheme and options for logging.

What does Postgres-XL do? XL allows you to scale a database up from one node to many nodes. It’s a shared nothing cluster, with all the nodes in one place, though with HA and DR options. So yes, its scalable, just like MongoDB, Cassandra etc.. though XL runs both schemaless JSON and structured relational data. And most importantly, Postgres-XL does both Big Data analytics (SQL, joins etc..) and fine-grained OLTP with MVCC in the same platform. So you can load your data and then immediately run queries against it, no need to export it to another kind of database.

So both Postgres-BDR and Postgres-XL are very significant enhancements to PostgreSQL core.

Why do we have two? Why Postgres-BDR and Postgres-XL? Each variant has its own use case, so the separation isn’t really an issue. Eventually we’ll be able to take advantage of all that functionality in one system, but that will take a few years while we get that to work. And we are working as actively as we can on returning that all into the main project. pglogical and the push to get Logical Replication into 10.x are just part of that.

The Postgres-BDR and Postgres-XL projects use the same copyright and licence as the main PostgreSQL project because the intention is to feed back from those projects into the main distro. If it doesn’t have the right licence then it’s not ever going to be fed back into PostgreSQL core – it is not compatible and won’t ever be accepted.

Leave a Reply

Your email address will not be published. Required fields are marked *