Skip to content

Move partition_name to the partitioning strategy

Max Orefice requested to merge morefice/improve-partition-suffix-naming into master

Ref: #413849

What does this MR do and why?

Extracted from !168078 in order to make the change easy.

This MR moves .partition_name to the given partitioning strategy in order to support upcoming strategies.

With this change we will be able to support daily and weekly strategy hence the need to change the naming for a better understanding.

Here how this will look like at the database level:

gitlabhq_development=# \d+ web_hook_logs
                                                                   Partitioned table "public.web_hook_logs"
Partitions: gitlab_partitions_dynamic.web_hook_logs_202409 FOR VALUES FROM ('2024-09-01 00:00:00') TO ('2024-10-01 00:00:00'),
            gitlab_partitions_dynamic.web_hook_logs_20241013 FOR VALUES FROM ('2024-10-13 00:00:00') TO ('2024-10-13 23:59:59'),
            gitlab_partitions_dynamic.web_hook_logs_202411 FOR VALUES FROM ('2024-11-01 00:00:00') TO ('2024-12-01 00:00:00'),
            gitlab_partitions_dynamic.web_hook_logs_2024_w41 FOR VALUES FROM ('2024-10-07 00:00:00') TO ('2024-10-13 00:00:00'),
            gitlab_partitions_dynamic.web_hook_logs_202504 FOR VALUES FROM ('2025-04-01 00:00:00') TO ('2025-05-01 00:00:00')
Edited by Max Orefice

Merge request reports

Loading