How to Ignore Events from a Specific Table Over Replication

Rupert Harwood -

Clustrix has the ability to ignore replication events for any particular table. It works the same way as specifying databases to ignore (or include) which is documented here.

For a per table basis, you need to use the table mysql_table_replication_policy and the global mysql_default_table_replication_policy, instead of using the table mysql_db_replication_policy and the global mysql_default_db_replication_policy.

For example to ignore db1.table1 and db2.table2 on slave you would:

sql> SET GLOBAL mysql_default_table_replication_policy = true; 

sql> INSERT INTO mysql_table_replication_policy (slave_name, `database`, `table`, allow) VALUES ('slave', 'db1', 'table1', false);

sql> INSERT INTO mysql_table_replication_policy (slave_name, `database`, `table`, allow) VALUES ('slave', 'db2', 'table2', false);

Notes:

  • You need to specify the slave name as well as db and table names. 
  • This configuration is read when the Slave starts, which happens periodically when its buffer fills. Stop the Slave manually before changing policies.

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk