From f83adeee8a331fd76061b44559c417d5c4d3a982 Mon Sep 17 00:00:00 2001 From: Maksym Buz Date: Mon, 30 Mar 2026 21:18:15 +0000 Subject: [PATCH] build(repo): restructure repository into postgresql subdirectory with template and script --- postgresql/README.md | 8 ++++++++ postgresql/script/README.md | 3 +++ {template => postgresql/template}/README.md | 0 {template => postgresql/template}/partitions.get_all.sql | 0 .../template}/zbx_pg_partitions_monitor_agent2.yaml | 0 5 files changed, 11 insertions(+) create mode 100644 postgresql/README.md create mode 100644 postgresql/script/README.md rename {template => postgresql/template}/README.md (100%) rename {template => postgresql/template}/partitions.get_all.sql (100%) rename {template => postgresql/template}/zbx_pg_partitions_monitor_agent2.yaml (100%) diff --git a/postgresql/README.md b/postgresql/README.md new file mode 100644 index 0000000..14ec183 --- /dev/null +++ b/postgresql/README.md @@ -0,0 +1,8 @@ +# PostgreSQL Partitioning for Zabbix + +This directory contains solutions for partitioning a Zabbix database running on PostgreSQL. Partitioning is essential for large Zabbix environments as it eliminates the need for the built-in Zabbix Housekeeper to aggressively delete old data row-by-row, replacing it with instant DDL operations that drop entire daily or monthly chunks. + +## Implementations + +- **[procedures](procedures/)**: The recommended Declarative (SQL-based) implementation. It uses native PostgreSQL procedures and features like `pg_cron` for entirely self-contained maintenance. +- **[script](script/)**: External script-based management solution. (Coming soon) diff --git a/postgresql/script/README.md b/postgresql/script/README.md new file mode 100644 index 0000000..2c38b68 --- /dev/null +++ b/postgresql/script/README.md @@ -0,0 +1,3 @@ +# Script-based Partitioning + +(Coming soon) diff --git a/template/README.md b/postgresql/template/README.md similarity index 100% rename from template/README.md rename to postgresql/template/README.md diff --git a/template/partitions.get_all.sql b/postgresql/template/partitions.get_all.sql similarity index 100% rename from template/partitions.get_all.sql rename to postgresql/template/partitions.get_all.sql diff --git a/template/zbx_pg_partitions_monitor_agent2.yaml b/postgresql/template/zbx_pg_partitions_monitor_agent2.yaml similarity index 100% rename from template/zbx_pg_partitions_monitor_agent2.yaml rename to postgresql/template/zbx_pg_partitions_monitor_agent2.yaml