From: Matt Amos Date: Wed, 19 Apr 2017 11:47:45 +0000 (+0100) Subject: Reduce WAL archive length. X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/86aa04a67f5f1c0f0e556ecb969287a1573831ba Reduce WAL archive length. Was 40 days, this reduces it to 21 days. That should roughly halve the amount of disk space needed to store all the WALs, at the cost that it's more difficult to recover a replica which has been out of sync for between 22 and 40 days. Closes #121 --- diff --git a/cookbooks/db/templates/default/cron.erb b/cookbooks/db/templates/default/cron.erb index e17add1c1..5f9b51c00 100644 --- a/cookbooks/db/templates/default/cron.erb +++ b/cookbooks/db/templates/default/cron.erb @@ -1,4 +1,4 @@ #!/bin/sh -# Cleanup archive directory -find -L /store/postgresql/archive -mtime +40 -print0 | xargs -0r rm +# Cleanup archive directory - keep 3 weeks of WALs +find -L /store/postgresql/archive -mtime +21 -print0 | xargs -0r rm