@@ -36,7 +36,7 @@ do_delete(InstanceState *instanceState, time_t backup_id)
3636parray * backup_list ,
3737* delete_list ;
3838pgBackup * target_backup = NULL ;
39- size_t size_to_delete = 0 ;
39+ int64 size_to_delete = 0 ;
4040char size_to_delete_pretty [20 ];
4141
4242/* Get complete list of backups */
@@ -682,12 +682,11 @@ do_retention_wal(InstanceState *instanceState, bool dry_run)
682682 * at least one backup and no file should be removed.
683683 * Unless wal-depth is enabled.
684684 */
685- if ((tlinfo -> closest_backup )&& instance_config .wal_depth < =0 )
685+ if ((tlinfo -> closest_backup )&& instance_config .wal_depth = =0 )
686686continue ;
687687
688688/* WAL retention keeps this timeline from purge */
689- if (instance_config .wal_depth >=0 && tlinfo -> anchor_tli > 0 &&
690- tlinfo -> anchor_tli != tlinfo -> tli )
689+ if (tlinfo -> anchor_tli > 0 && tlinfo -> anchor_tli != tlinfo -> tli )
691690continue ;
692691
693692/*
@@ -701,7 +700,7 @@ do_retention_wal(InstanceState *instanceState, bool dry_run)
701700 */
702701if (tlinfo -> oldest_backup )
703702{
704- if (instance_config . wal_depth >= 0 && !(XLogRecPtrIsInvalid (tlinfo -> anchor_lsn )))
703+ if (!(XLogRecPtrIsInvalid (tlinfo -> anchor_lsn )))
705704{
706705delete_walfiles_in_tli (instanceState ,tlinfo -> anchor_lsn ,
707706tlinfo ,instance_config .xlog_seg_size ,dry_run );
@@ -714,7 +713,7 @@ do_retention_wal(InstanceState *instanceState, bool dry_run)
714713}
715714else
716715{
717- if (instance_config . wal_depth >= 0 && !(XLogRecPtrIsInvalid (tlinfo -> anchor_lsn )))
716+ if (!(XLogRecPtrIsInvalid (tlinfo -> anchor_lsn )))
718717delete_walfiles_in_tli (instanceState ,tlinfo -> anchor_lsn ,
719718tlinfo ,instance_config .xlog_seg_size ,dry_run );
720719else
@@ -942,7 +941,7 @@ delete_walfiles_in_tli(InstanceState *instanceState, XLogRecPtr keep_lsn, timeli
942941join_path_components (wal_fullpath ,instanceState -> instance_wal_subdir_path ,wal_file -> file .name );
943942
944943/* save segment from purging */
945- if (instance_config . wal_depth >= 0 && wal_file -> keep )
944+ if (wal_file -> keep )
946945{
947946elog (VERBOSE ,"Retain WAL segment \"%s\"" ,wal_fullpath );
948947continue ;
@@ -1027,7 +1026,7 @@ do_delete_status(InstanceState *instanceState, InstanceConfig *instance_config,
10271026parray * backup_list ,* delete_list ;
10281027const char * pretty_status ;
10291028int n_deleted = 0 ,n_found = 0 ;
1030- size_t size_to_delete = 0 ;
1029+ int64 size_to_delete = 0 ;
10311030char size_to_delete_pretty [20 ];
10321031pgBackup * backup ;
10331032