feat: add housekeeper task interceptor trigger and update docs

This commit is contained in:
Maksym Buz
2026-04-29 17:12:18 +00:00
parent a88cee43b6
commit 59b2780125
13 changed files with 158966 additions and 148395 deletions

View File

@@ -226,3 +226,14 @@ BEGIN
END LOOP;
END;
$$;
-- Trigger function to silently discard housekeeper tasks for partitioned tables
CREATE OR REPLACE FUNCTION partitions.housekeeper_insert_trigger()
RETURNS TRIGGER AS $$
BEGIN
IF EXISTS (SELECT 1 FROM partitions.config WHERE table_name = NEW.tablename) THEN
RETURN NULL;
END IF;
RETURN NEW;
END;
$$ LANGUAGE plpgsql;