[MDEV-23497] make ROW_FORMAT=COMPRESSED read-only by default Created: 2020-08-17 Updated: 2022-02-14 Resolved: 2020-11-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Fix Version/s: | 10.6.0 |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Golubchik | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Description |
|
introduce a new innodb command line option that will make compressed tables writable. by default they should be read-only. if the write support is enabled, it should print a warning on startup. This will allow users to prepare for |
| Comments |
| Comment by Marko Mäkelä [ 2020-11-10 ] | ||
|
I think that it was easier to complete this than to provide an estimate. Most of the time was spent on adding SET GLOBAL innodb_read_only_compressed=OFF around tests that cover the ROW_FORMAT=COMPRESSED format. We must keep those tests until we remove the write support. | ||
| Comment by Marko Mäkelä [ 2020-11-11 ] | ||
|
To allow ROW_FORMAT=COMPRESSED tables to be created or written, we introduce an option:
That parameter may be deprecated and ignored in the next major version (along with the code to support writing ROW_FORMAT=COMPRESSED tables in InnoDB. | ||
| Comment by Nuno [ 2021-01-01 ] | ||
|
@Marko - will we at least be provided with a way to easily convert ONLINE these tables to the alternative? (PAGE_COMPRESSED=1) I have large compressed tables on my 24-hour online write-intensive website. This change seems to mean to me that I won't be able to upgrade my MariaDB version to 10.7+, once the COMPRESSED feature is completely removed... Also, as discussed in MDEV-22839, PAGE_COMPRESSED doesn't really seem to work well for me. It even increased the non-sparse size of the data & indexes, when I tested... I'm really not happy with this change. > "Nowadays, with fast solid-state storage being a commodity," I would be careful in saying this. | ||
| Comment by Olaf Buitelaar [ 2021-02-14 ] | ||
|
@Nuno I agree with you. I've also TB's of table's using ROW_FORMAT=COMPRESSED and run on-prem. i'm a bit concerned indeed this feature will be dropped. | ||
| Comment by Marko Mäkelä [ 2021-03-10 ] | ||
|
I implemented online table rebuild in MySQL 5.6.8, and the feature is present in MariaDB 10.0 already. You should be able to just execute something like the following:
The table will be rebuilt, while even allowing concurrent writes. And concurrent writes will be allowed while the table is being rebuilt, as long as
is in effect. | ||
| Comment by Olaf Buitelaar [ 2021-03-10 ] | ||
|
Thanks for the suggestion, and i'm sure it would work. But the tables are extremely large 15+TB (however partitioned), this would mean we would require that space double during the rebuild. Also the tables are quite write intensive, so IO would double during the rebuild time. Last in the past i had some page corruption errors, which i was not able to recover. Probably rebuilding the table would let those errors surface again. Also during testing it seemed the compression ratio with
vs
was much better | ||
| Comment by Marko Mäkelä [ 2021-03-18 ] | ||
|
olafbuitelaar, thank you for your feedback. ALTER TABLE should only read the clustered index, not secondary indexes. In fact, rebuilding a table would fix corrupted secondary indexes (I hope that I hope that page_compressed together with compressed columns ( | ||
| Comment by Rick James [ 2021-08-02 ] | ||
|
Are there any creditable benchmarks on the CPU, I/O, and disk space for ROW_FORMAT=COMPRESSED? I have long been skeptical about the feature. I will continue to steer people away from using that setting. | ||
| Comment by Marko Mäkelä [ 2021-08-30 ] | ||
|
Based on https://github.com/nextcloud/server/issues/25436 NextCloud appears to be using ROW_FORMAT=COMPRESSED for InnoDB tables. | ||
| Comment by Marko Mäkelä [ 2021-08-30 ] | ||
|
rjasdfiii, I remember that back in 2006 or 2007, when I had completed the implementation of ROW_FORMAT=COMPRESSED for the InnoDB Plugin for MySQL 5.0 based on some rough ideas of Heikki Tuuri, some performance tests were run, and the results were not great. I think that we really have to compare all performance aspects to page_compressed, as suggested in MDEV-22839. | ||
| Comment by Marko Mäkelä [ 2022-02-14 ] | ||
|
|