Migrating from 'innodb' checksum to 'crc32' checksum

Hello, I am using MariaDB 10.4, and I am attempting to migrate the MariaDB server from the ‘innodb’ checksum algorithm to ‘crc32’ by modifying the innodb_checksum_algorithm configuration.

Could you please provide the migration steps to rebuild existing InnoDB tables and verify that there are no impacts on any existing InnoDB table pages after changing the checksum algorithm?

Answer Answered by Marko Mäkelä in this comment.

I realize that it might be helpful to add back the innodb and none checksum algorithms to the innochecksum utility. This would require some code refactoring, duplicating some InnoDB source code instead of compiling that code with special options for inclusion in <<code>innochecksum<</code>>.

On the other hand, you could use the innochecksum utility from an older release to verify that the page checksums are valid and to convert them to the crc32 checksum. If you do not care about the verification step, then you should be able to blindly rewrite the page checksums to the crc32 format.

Still, I think that the best solution would be to rebuild all InnoDB tables, simply by OPTIMIZE TABLE. To see which tables are not in the full_crc32 format yet, try the following trick from MDEV-32230: SELECT name FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE row_format IS NULL;

I am afraid that the only way to convert the InnoDB system tablespace to the full_crc32 format would be to rebuild the entire database from a logical dump. The next best thing that you could do is to use innochecksum to convert each page to the crc32 checksum, and then start the server with innodb_checksum_algorithm=strict_full_crc32 so that new files will be created in the full_crc32 format, and for any old-format files only the crc32 page checksums will be allowed.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.