3

I have this cluster where master and slave uses same indexes but one of the slaves has some extra indexes (large machine which runs some analytics queries).

So I have to maintain two sets of indexes. But this usually creates a problem when I want to recreate an index on master that was already present on the analytics slave.

Can I stop replication of create/drop index statements on one of the slaves so that I can manage them manually?

1 Answer 1

0

I don't believe there is a way to ignore specific DDL (or any DDL?). If creating an existing index, it should throw an error, which you should be able to ignore on your analytics-slave.

Alternatively, don't replicate Index Creations.

set log_bin=0; 
create index name on table;
set log_bin=1; 

Create a wrapper script to apply to master and slave as needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.