TransWikia.com

galera cluster how to run an ALTER without using RSU/TOI

Database Administrators Asked on November 15, 2021

I need to run an alter statement but would like to prevent locking/stall the cluster. The Galera docs advised using:

SET wsrep_OSU_method='RSU';

Then Run the ALTER statement, once finich:

SET wsrep_OSU_method='TOI';

Problem is that this needs to be run in every node, and I have only access to one node behind a load balancer, any alternatives or workarounds?

One Answer

RSU: You must bypass the load balancer and go straight to each node in turn.

TOI: Simply run the ALTER on any node. The downside is that if the ALTER takes a long time, it will, as you say, lock/stall the cluster.

gh-ost: This depends on the binlog, which (I think) is not used in Galera.

pt-online-schema-change: This requires adding TRIGGERs to the table -- perhaps a problem? And it requires a script to continually talk to the server in question -- will your load balancer allow such? And it probably wants to treat the system as Master-Slave(s), not Multi-Master -- apparently you have set up Galera set up Multi-Master?

Answered by Rick James on November 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP