Enhance partitioning logic and update Zabbix config template

This commit is contained in:
Maksym Buz
2026-04-02 17:02:18 +00:00
parent f83adeee8a
commit fb65b2f1e7
5 changed files with 81 additions and 14 deletions

View File

@@ -8,7 +8,7 @@ CREATE SCHEMA IF NOT EXISTS partitions;
-- Configuration table to store partitioning settings per table
CREATE TABLE IF NOT EXISTS partitions.config (
table_name text NOT NULL,
period text NOT NULL CHECK (period IN ('day', 'week', 'month', 'year')),
period text NOT NULL,
keep_history interval NOT NULL,
future_partitions integer NOT NULL DEFAULT 5,
last_updated timestamp WITH TIME ZONE DEFAULT (now() AT TIME ZONE 'UTC'),