walmgr: fix backup from slave
authorSergey Burladyan <eshkinkot@gmail.com>
Thu, 10 May 2012 17:55:43 +0000 (20:55 +0300)
committerMarko Kreen <markokr@gmail.com>
Thu, 10 May 2012 18:19:30 +0000 (21:19 +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 f990bdef5b5da2f204b6b3b5036453b86deefd5c..37d3ea7891fa8ab5386488beeb5db66ffd8b0984 100755 (executable)
@@ -1265,7 +1265,7 @@ primary_conninfo     = %(primary_conninfo)s
                 stop_time = time.localtime()
 
                 # Obtain the last restart point information
-                ctl = PgControlData(self.cf.getfile("slave_bin", ""), dst, False)
+                ctl = PgControlData(self.cf.getfile("slave_bin", ""), dst, True)
 
                 # TODO: The newly created backup directory probably still contains
                 # backup_label.old and recovery.conf files. Remove these.