BDR truncate and replication sets - Mailing list pgsql-general

From Sylvain MARECHAL
Subject BDR truncate and replication sets
Date
Msg-id 55F7D068.7070806@gmail.com
Whole thread Raw
Responses Re: BDR truncate and replication sets
List pgsql-general
Hello all,

To avoid replication of some tables, I use a specific replication set.
For example, with 2 nodes 'node1' and 'node2' and a table 'test' which
content shall not be replicated, I do the following:

mydb=# CREATE TABLE test (i INT PRIMARY KEY NOT NULL);
mydb=# SELECT bdr.table_set_replication_sets('test', ARRAY['test_rep_set']);

After that, adding (INSERT) or removing (DELETE) data in 'node1' or
'node2' can be done independently.
The exception is with TRUNCATE: In case it is called, data is removed on
both nodes.

Is it a feature or a bug?
(I am not sure it is related with
https://github.com/2ndQuadrant/bdr/issues/93)

Is there a workaround?
(deleting the truncate trigger seems to work, but I am sure it is safe
to do it)

Thanks and Regards,
--
Sylvain



pgsql-general by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Materialized View or table?
Next
From: sri harsha
Date:
Subject: Multiple Update queries