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

InnoDB system tablespace is not shrunk on slow shutdown

Details

    Description

      jeanfrancois.gagne suggested that it would be easier for users if they did not have to modify any start-up parameters (adding an :autoshrink attribute to innodb_data_file_path) but could simply have InnoDB shrink the system tablespace during a slow shutdown (after SET GLOBAL innodb_fast_shutdown=0).

      The reason why the :autoshrink attribute was introduced in MDEV-14795 to make the cleanup opt-in was twofold: to reduce the InnoDB startup time and to avoid any trouble in case the system tablespace is corrupted in any way. The way the feature is implemented should avoid trouble, by first checking that everything is consistent and then making the modifications.

      Attempting to shrink the system tablespace on a slow shutdown will retain the opt-in aspect: the default value is innodb_fast_shutdown=1. The time needed for shrinking the system tablespace should be negligible (some seconds) compared to the time needed for a complete purge of committed transaction history (which could even be hours, depending on the state of the database).

      Dedicated undo tablespaces will be truncated based on the value of the settable global variable innodb_undo_log_truncate. That logic would not be touched here.

      Attachments

        Issue Links

          Activity

            marko Marko Mäkelä created issue -
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Assignee Thirunarayanan Balathandayuthapani [ thiru ] Marko Mäkelä [ marko ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            marko Marko Mäkelä made changes -
            Assignee Marko Mäkelä [ marko ] Thirunarayanan Balathandayuthapani [ thiru ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            thiru Thirunarayanan Balathandayuthapani made changes -
            Fix Version/s 11.2.3 [ 29521 ]
            Fix Version/s 11.3 [ 28565 ]
            Fix Version/s 11.2 [ 28603 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            thiru Thirunarayanan Balathandayuthapani made changes -

            People

              thiru Thirunarayanan Balathandayuthapani
              marko Marko Mäkelä
              Votes:
              1 Vote for this issue
              Watchers:
              4 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.