Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-9820

global option to enable page compression for all new tables

Details

    Description

      Page compression is transparent for the client accessing the database, but for most existing applications which create tables by themselves, it is inconvenient to implement compression because you must specify whether each table should be compressed at creation. Since an existing application might not support this function and it may create new tables as it runs, it would not use compression at all.

      If the application is written in-house or open source, you could modify the source code to enable compression when creating new tables, but for closed source applications which use MariaDB/MySQL, it is impossible.

      I propose that a global boot variable is created that can be configured in server.cnf to set the default value for all new tables created to compression=1, so that all tables created on the database server can utilize whatever compression the system is configured for.

      Attachments

        Issue Links

          Activity

            ratzpo Rasmus Johansson (Inactive) added a comment - Added the innodb_compression_default variable (boolean). https://mariadb.com/kb/en/mariadb/xtradbinnodb-server-system-variables/#innodb_compression_default
            ip1981 Igor Pashev added a comment -

            ip1981 Igor Pashev added a comment -
            ip1981 Igor Pashev added a comment -

            Does it affect migration from previous versions if I enable compression by default?

            I got this error ( this is not a production server, no one is fired ):

            [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
            [ERROR] InnoDB: Header page consists of zero bytes in datafile: ./ibdata1, Space ID:0, Flags: 0. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troub
            [ERROR] InnoDB: Corrupted page [page id: space=0, page number=0] of datafile './ibdata1' could not be found in the doublewrite buffer.
            [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
            

            Previous version was 10.1.21 with lz4 compression (global default) and compression enabled per table, (all tables in all databases, except mysql of course).
            New version is 10.2.3 with compression turned on globally and default algorithm lzma.

            ip1981 Igor Pashev added a comment - Does it affect migration from previous versions if I enable compression by default? I got this error ( this is not a production server, no one is fired ): [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). [ERROR] InnoDB: Header page consists of zero bytes in datafile: ./ibdata1, Space ID:0, Flags: 0. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troub [ERROR] InnoDB: Corrupted page [page id: space=0, page number=0] of datafile './ibdata1' could not be found in the doublewrite buffer. [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption Previous version was 10.1.21 with lz4 compression (global default) and compression enabled per table, (all tables in all databases, except mysql of course). New version is 10.2.3 with compression turned on globally and default algorithm lzma.
            ip1981 Igor Pashev added a comment -

            Uh.. with clean setup, and global lz4 compression mysqld eats all the RAM... and swap

            ip1981 Igor Pashev added a comment - Uh.. with clean setup, and global lz4 compression mysqld eats all the RAM... and swap
            ip1981 Igor Pashev added a comment -

            That's unrelated to the innodb_compression_default option. 10.2.3 just runs out of memory.

            ip1981 Igor Pashev added a comment - That's unrelated to the innodb_compression_default option. 10.2.3 just runs out of memory.

            People

              ratzpo Rasmus Johansson (Inactive)
              thomasmaerz Thomas Maerz
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.