Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6b4c90a

Browse files
committed
check file existence in archive-push
1 parent70ff5aa commit6b4c90a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/archive.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ do_archive_push(char *wal_file_path, char *wal_file_name)
6565
join_path_components(absolute_wal_file_path,current_dir,wal_file_path);
6666
join_path_components(backup_wal_file_path,arclog_path,wal_file_name);
6767

68+
if (access(absolute_wal_file_path,F_OK)!=-1)
69+
elog(ERROR,"file '%s', already exists.",absolute_wal_file_path);
70+
6871
elog(INFO,"pg_probackup archive-push from %s to %s",absolute_wal_file_path,backup_wal_file_path);
6972
copy_wal_file(absolute_wal_file_path,backup_wal_file_path);
7073
elog(INFO,"pg_probackup archive-push completed successfully");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp