summaryrefslogtreecommitdiff
path: root/python/walmgr.py
diff options
context:
space:
mode:
authorMartin Pihlak2011-10-14 13:31:07 +0000
committerMartin Pihlak2011-10-14 13:31:07 +0000
commit3ea3688054464753fc1864f43096e8c5cc3ced44 (patch)
tree9305c7627bd4fa3710468aa9c776e2121f05ac80 /python/walmgr.py
parent42784b020503b864ec42acd5a5c19704a7b18e41 (diff)
add "pg_archivecleanup" to recovery.conf.
Diffstat (limited to 'python/walmgr.py')
-rwxr-xr-xpython/walmgr.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/walmgr.py b/python/walmgr.py
index 6c56b367..f296e7ac 100755
--- a/python/walmgr.py
+++ b/python/walmgr.py
@@ -977,7 +977,6 @@ compression = %(compression)s
self.override_cf_option('slave_config_dir', os.path.dirname(self.postgres_conf))
if self.initd_script:
- print "overriding "
self.override_cf_option('slave_start_cmd', "%s start" % self.initd_script)
self.override_cf_option('slave_stop_cmd', "%s stop" % self.initd_script)
@@ -1861,6 +1860,9 @@ STOP TIME: %(stop_time)s
conf += "standby_mode = 'on'\n"
conf += "trigger_file = '%s'\n" % os.path.join(self.cf.getfile("completed_wals"), "STOP")
conf += "primary_conninfo = '%s'\n" % primary_conninfo
+ conf += "archive_cleanup_command = '%s %s %%r'\n" % \
+ (os.path.join(self.cf.getfile("slave_bin"), "pg_archivecleanup"),
+ self.cf.getfile("completed_wals"))
self.log.info("Write %s" % rconf)
if self.not_really: