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

Allow instant change of WITH SYSTEM VERSIONING column attribute

    XMLWordPrintable

    Details

      Description

      An ALTER TABLE operation that specifies WITH SYSTEM VERSIONING or WITHOUT SYSTEM VERSIONING on a column will set the flag ALTER_COLUMN_UNVERSIONED, which currently causes the table to be rebuilt.

      As far as I can tell, the change should not require rebuilding anything. The data in the table remains the same.

      Enabling WITH SYSTEM VERSIONING for a column should be an instantaneous change, assuming that system versioning is already enabled on the table. This would only set some metadata so that future UPDATE on that column will cause the versioning information to be stored.

      Specifying WITHOUT SYSTEM VERSIONING might involve removing old history data for that column. That could be done by a table scan and update, which is cheaper than a full rebuild. We could also redefine the semantics of the operation, documenting that any old historical data for the column would survive.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kevg Eugene Kosov
                Reporter:
                marko Marko Mäkelä
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: