Add a worker and strategies for pruning date partitions
We need to prune old partitions for tables with a retention policy.
Our initial use case will be the recently partitioned by month web_hook_logs table:
- It has a pruning worker (
PruneWebHookLogsWorker
) that no longer works and we had to disable it (#256088 (closed)) - It is partitioned by month
- It has a clearly defined retention policy of 90 days, which means that we only need to keep the 4 most recent partitions at any time.
Similarly to supporting partitioning strategies, we may want to address partition pruning on a more generic way, by adding pruning strategies and a worker to apply them (e.g. at the start of each month for monthly partitions)
We will follow this by enabling partitioning for web_hook_logs
with #332200 (closed)
Edited by Yannis Roussos