(self,walname)
return ctl.wal_name
Determine the WAL file of the last restart point (recovery checkpoint).
        For 8.3 this could be done with %r parameter to restore_command, for 8.2
        we need to consult control file (parse pg_controldata output).
Determine the WAL file of the last restart point (recovery checkpoint).
        For 8.3 this could be done with %r parameter to restore_command, for 8.2
        we need to consult control file (parse pg_controldata output).
Determine the WAL file of the last restart point ( recovery checkpoint ) . For 8 . 3 this could be done with %r parameter to restore_command for 8 . 2 we need to consult control file ( parse pg_controldata output ) .
def last_restart_point(self,walname):
        """
        Determine the WAL file of the last restart point (recovery checkpoint).
        For 8.3 this could be done with %r parameter to restore_command, for 8.2
        we need to consult control file (parse pg_controldata output).
        """
        slave_data = self.cf.getfile("slave_data")
        backup_label = os.path.join(slave_data, "backup_label")
        if os.path.exists(backup_label):
            # Label file still exists, use it for determining the restart point
            lbl = BackupLabel(slave_data)
            self.log.debug("Last restart point from backup_label: %s", lbl.first_wal)
            return lbl.first_wal

        ctl = PgControlData(self.cf.getfile("slave_bin", ""), ".", True)
        if not ctl.is_valid:
            # No restart point information, use the given wal name
            self.log.warning("Unable to determine last restart point")
            return walname

        self.log.debug("Last restart point: %s", ctl.wal_name)
        return ctl.wal_name
def last_restart_point ( self , walname ) : slave_data = self . cf . getfile ( "slave_data" ) backup_label = os . path . join ( slave_data , "backup_label" ) if os . path . exists ( backup_label ) : # Label file still exists, use it for determining the restart point lbl = BackupLabel ( slave_data ) self . log . debug ( "Last restart point from backup_label: %s" , lbl . first_wal ) return lbl . first_wal ctl = PgControlData ( self . cf . getfile ( "slave_bin" , "" ) , "." , True ) if not ctl . is_valid : # No restart point information, use the given wal name self . log . warning ( "Unable to determine last restart point" ) return walname self . log . debug ( "Last restart point: %s" , ctl . wal_name ) return ctl . wal_name