From 4fc9ed35cc1b2de77b5b29e6b04f14f2ffb3d1ba Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Sat, 9 Nov 2024 11:24:55 +0100 Subject: [PATCH] Let's vacuum postgres one per month --- manifests/mastodon/backend.pp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/manifests/mastodon/backend.pp b/manifests/mastodon/backend.pp index f4c89a93..e4591729 100644 --- a/manifests/mastodon/backend.pp +++ b/manifests/mastodon/backend.pp @@ -92,5 +92,13 @@ warn_criteria => ['exit_status=1', 'max_age=5h'], } } + sunet::scriptherder::cronjob { 'vacuum_postgres': + cmd => '/usr/bin/docker exec -u postgres postgres psql --command "VACUUM FULL;"', + minute => '3', + hour => '3', + monthday => '3', + ok_criteria => ['exit_status=0', 'max_age=32d'], + warn_criteria => ['exit_status=1', 'max_age=64d'], + } }