Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fdfb074

Browse files
committed
Fix remote delta backup
1 parent be78ca6 commit fdfb074

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/data.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ backup_data_file(backup_files_arg* arguments,
667667
*/
668668
if (n_blocks_read != 0 && n_blocks_read == n_blocks_skipped)
669669
{
670-
if (remove(to_path) == -1)
670+
if (fio_unlink(to_path, FIO_BACKUP_HOST) == -1)
671671
elog(ERROR, "cannot remove file \"%s\": %s", to_path,
672672
strerror(errno));
673673
return false;

src/delete.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ delete_backup_files(pgBackup *backup)
296296
elog(INFO, "Progress: (%zd/%zd). Process file \"%s\"",
297297
i + 1, num_files, file->path);
298298

299-
pgFileDelete(file);
299+
fio_unlink(file->path, FIO_BACKUP_HOST);
300300
}
301301

302302
parray_walk(files, pgFileFree);

0 commit comments

Comments
 (0)