How to alter tables safely to set row_format as Compressed or Dynamic in Mariadb Galera Cluster?

dba.stackexchange https://dba.stackexchange.com/questions/265756

  •  28-02-2021
  •  | 
  •  

Frage

We have some tables with row_format=Compact. The biggest table is around 30Gb, so how safely i can alter tables and set the row format as Compressed for the big table and Dynamic for other three tables which are under 10GB each? It is a cluster with three nodes with mariadb v10.4.12 and Galera 4. Running DDL / alter tables and change the row format can leads to cluster blocking and maybe it took long time!

Can anyone help and guide me how i can do it? Do you think using RSU mode helps here and is it safe since we talking about changing the row format?

War es hilfreich?

Lösung

Since you are not really changing any data nor the schema, just the underlying row_format, seems like RSU would be better, and a lot less invasive.

You might also take each node out of the cluster while doing the ALTER, or at least remove the one node from the proxy's list. This should avoid letting queries hit the table.

I feel pretty sure that the table will be blocked from writes and possibly reads during the conversion.

It would be wise to test this on an offline cluster, including testing reads/writes.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit dba.stackexchange
scroll top