[MDEV-27328] Change of SYSTEM_TIME partitioning options is not possible without data copy Created: 2021-12-20 Updated: 2022-08-03 Resolved: 2022-05-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Partitioning, Versioned Tables |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6, 10.7, 10.8 |
| Fix Version/s: | 10.9.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Aleksey Midenkov | Assignee: | Aleksey Midenkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
When we need to add/remove or change LIMIT, INTERVAL, AUTO we have to recreate partitioning from scratch. Such operations should be done fast. To remove options like LIMIT or INTERVAL one should write:
The command checks whether it is new or existing SYSTEM_TIME partitioning. And in the case of new it behaves as CREATE would do: adds default number of partitions (2). If SYSTEM_TIME partitioning already existed it just changes its options: removes unspecified ones and adds/changes those specified explicitly. In case when partitions list was supplied it behaves as usual: does full repartitioning. Examples:
|
| Comments |
| Comment by Aleksey Midenkov [ 2021-12-21 ] |
|
Please review bb-10.5-midenok |
| Comment by Nikita Malyavin [ 2021-12-27 ] |
|
Agree about semantics, and approve it. For docs team:
Otherwise it will do fast alter table. For the context and some reasoning, one can also see |
| Comment by Aleksey Midenkov [ 2021-12-28 ] |
|
Actually there was some worry from nikitamalyavin side about the syntax so please confirm the approach. In favour of the approach elenst tried that syntax intuitively in |
| Comment by Oleksandr Byelkin [ 2022-01-03 ] |
|
As I unterstand AUTO is applicable only for new partitios, so it is OK. But how it will behave with LIMIT and old partitions is not clear, could we discuss it? |
| Comment by Elena Stepanova [ 2022-01-03 ] |
I don't think |
| Comment by Oleksandr Byelkin [ 2022-01-11 ] |
|
We agreed that server behaviour better to change in the new versions. Also it should be documentated. |
| Comment by Aleksey Midenkov [ 2022-01-12 ] |
|
Please update documenation for SYSTEM_TIME partitioning in 10.8 according to this task. |
| Comment by Aleksey Midenkov [ 2022-04-28 ] |
This keyword should apply to partitioning only. Individual attributes apply in partitions list. |
| Comment by Aleksey Midenkov [ 2022-08-03 ] |
|
julien.fritsch Why you did not automate that on closing the issue? |