Discussion:
BDR Error recovery
p***@mailme.dk
2014-09-15 17:52:35 UTC
Permalink
Ubuntu 14.04 with compiled BDR 0.7.1

This is a very interesting project for a lot of potential applications.
However as in any project there will be a few initial issues.

My question is how do I recover from DDL errors ?

For example: given a setup of 2 BDR PostgreSQL hosts and on one of them
execute the following SQL:

create table test_table(id int);
create or replace view test_view as select * from test_table;
create or replace view test_view as select * from test_table;

This will result in an endless replication error. As far as I understand
because it is replicated as:

create table test_table(id int);
create view test_view as select * from test_table;
create view test_view as select * from test_table;

But rather than having you fix the problem I would be much more
interesting in learning how to recover from such as scenario.

Thanks

Poul
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Andres Freund
2014-09-16 12:44:05 UTC
Permalink
Hi,
Post by p***@mailme.dk
Ubuntu 14.04 with compiled BDR 0.7.1
This is a very interesting project for a lot of potential
applications.
Good to hear!
Post by p***@mailme.dk
However as in any project there will be a few initial issues.
Definitely.
Post by p***@mailme.dk
My question is how do I recover from DDL errors ?
For example: given a setup of 2 BDR PostgreSQL hosts and on one of them
create table test_table(id int);
create or replace view test_view as select * from test_table;
create or replace view test_view as select * from test_table;
This will result in an endless replication error. As far as I understand
create table test_table(id int);
create view test_view as select * from test_table;
create view test_view as select * from test_table;
Hm. That's obviously a bug. Even though not your main point, we'll fix
it :)
Post by p***@mailme.dk
But rather than having you fix the problem I would be much more
interesting in learning how to recover from such as scenario.
Currently it's a bit annoying. We're working on making the UI for it
better. All you can currently do is to skip the transaction doing the
DDL using pg_replication_identifier_advance(). Which requires some
fiddling around.
It's on our roadmap to make
a) skipping the replication of a transaction easier
b) allow to skip individual problematic actions in a transaction

Greetings,

Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Loading...