Emergency

Changing an async slave of a PXC cluster to a new Master using 5.6 and GTID


Posted on:

|

By:


PREVIOUS POST
NEXT POST
Share Button

Before Percona XtraBackup 2.1.7 and Percona XtraDB Cluster 5.6.15-25.3, rsync was the only SST method supporting GTID in the way that it was possible to move an asynchronous slave from one Galera node to another one (related bug).

Indeed, previous versions of Percona XtraBackup didn’t copy any binary log and due to that, moving the async slave to another master, just broke replication (when writes still happened).

Now with the latest version of Percona XtraBackup and Percona XtraDB Cluster, wsrep_sst_xtrabackup-v2 handles the last binlog sent from Percona XtraBackup and allows the move to another master in the easiest ways as possible using CHANGE MASTER TO MASTER_HOST = "new node". Nothing else needed.

It’s also obvious that using 5.6 and GTID is easier than previous 5.5 where is was more tricky to point the slave to the right position (see Jay’s blog post).

Don’t forget to provide a server-id to your PXC nodes. This is an example of configuration settings needed in my.cnf to enable GTID on Galera/PXC nodes:

Share Button
PREVIOUS POST
NEXT POST


Frederic Descamps

Frédéric joined Percona in June 2011, he is an experienced Open Source consultant with expertise in infrastructure projects as well in development tracks and database administration. Frédéric is a believer of devops culture.



Categories:
MySQL, Percona XtraBackup, Percona XtraDB Cluster


Comments
  • Hooray to that!

    Yet, doesn’t gtid_mode=on make server_id unnecessary?

    Reply

  • Hi Alex,

    During my test, if you don’t define a unique a server_id, the default value is 1 and then async replication (Slave_IO_Running) will stop with the following message :

    And of course you should not start this option with “–log-slave-updates” it will even fail to avoid infinite loop.

    So, for me, unique server_id is still necessary.

    Reply

Leave a Reply

Percona’s widely read Percona Data Performance blog highlights our expertise in enterprise-class software, support, consulting and managed services solutions for both MySQL® and MongoDB® across traditional and cloud-based platforms. The decades of experience represented by our consultants is found daily in numerous and relevant blog posts.

Besides specific database help, the blog also provides notices on upcoming events and webinars.

Want to get weekly updates listing the latest blog posts? Subscribe to our blog now! Submit your email address below.

No, thank you. Please do not ask me again.