]> git.openstreetmap.org Git - chef.git/commitdiff
Reduce WAL archive length.
authorMatt Amos <zerebubuth@gmail.com>
Wed, 19 Apr 2017 11:47:45 +0000 (12:47 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 19 Apr 2017 13:04:55 +0000 (14:04 +0100)
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

cookbooks/db/templates/default/cron.erb

index e17add1c1831d379a5e4ebca49486b4bb83680af..5f9b51c0006175301b7aabc0335a4c648ce05160 100644 (file)
@@ -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