[MDEV-17554] Auto-create history partitions for system-versioned tables Created: 2018-10-26 Updated: 2023-08-07 Resolved: 2022-05-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Partitioning, Versioned Tables |
| Fix Version/s: | 10.9.1 |
| Type: | Task | Priority: | Critical |
| Reporter: | Ulrich Moser (Inactive) | Assignee: | Aleksey Midenkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Preview_10.8 | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
Syntax changeKeyword AUTO enables partition auto-creation.
Or with explicit partitions:
DescriptionBefore executing history-generating DML command add N history If last history partition exceeds LIMIT records before DML command Auto-creation is implemented by synchronous The name for newly added partitions are generated like default These DML commands trigger auto-creation:
The reasons for this are:
|
| Comments |
| Comment by Aleksey Midenkov [ 2019-07-17 ] |
|
This first implementation is done in standalone thread. The drawback of this is that ALTER may be theoretically executed on unwanted table: 1. Table t1 is locked with LOCK TABLES; Current implementation does not have proper solution for this. But the ALTER will succeed only if new t1 is partitioned by SYSTEM_TIME and there is no partition by the name it tries to add. Though this behavior is generally unwanted, it has minor impact of one extra history partition in new table. In most cases ALTER will fail after old t1 is dropped, so this is low probability. |
| Comment by Aleksey Midenkov [ 2020-02-17 ] |
|
This task is continued by |
| Comment by Aleksey Midenkov [ 2021-12-04 ] |
|
Please review bb-10.7-midenok-MDEV-17554 |
| Comment by Sergei Golubchik [ 2021-12-11 ] |
|
commit e9f1bd41a29 looks ok! |
| Comment by Sergei Golubchik [ 2022-03-18 ] |
|
the branch name is now bb-10.8- |
| Comment by Elena Stepanova [ 2022-03-19 ] |
|
Please rebase it on the current 10.9 or at least 10.8 before moving to testing. |
| Comment by Aleksey Midenkov [ 2022-03-22 ] |
|
Rebased. Please test bb-10.9- |
| Comment by Lena Startseva [ 2022-04-28 ] |
|
Testing done. |