walmgr: fix backup from slave skytools_2_1_stable
authorSergey Burladyan <eshkinkot@gmail.com>
Thu, 10 May 2012 18:06:18 +0000 (21:06 +0300)
committerMarko Kreen <markokr@gmail.com>
Thu, 10 May 2012 18:06:18 +0000 (21:06 +0300)
Current version improperly remove needed WAL files when creating backup from slave.

The minimum WAL file is file with REDO record, not with latest checkpoint itself.

python/walmgr.py

index 12f58cb221531dedb786422ec9b543cf107c1131..bafcfdda6c84707936325f91324599f0bd0b643e 100755 (executable)
@@ -859,7 +859,7 @@ class WalMgr(skytools.DBScript):
                 stop_time = time.localtime()
 
                 # Obtain the last restart point information
-                ctl = PgControlData(self.cf.get("slave_bin", ""), dst, False)
+                ctl = PgControlData(self.cf.get("slave_bin", ""), dst, True)
 
                 # TODO: The newly created backup directory probably still contains
                 # backup_label.old and recovery.conf files. Remove these.