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

Commitae5aa3d

Browse files
committed
Implement remove ARCHIVE commands
1 parent58373a5 commitae5aa3d

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

‎src/archive.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ do_archive_push(char *wal_file_path, char *wal_file_name, bool overwrite)
5555
system_id);
5656

5757
/* Create 'archlog_path' directory. Do nothing if it already exists. */
58-
dir_create_dir(arclog_path,DIR_PERMISSION);
58+
fio_mkdir(arclog_path,DIR_PERMISSION,FIO_BACKUP_HOST);
5959

6060
join_path_components(absolute_wal_file_path,current_dir,wal_file_path);
6161
join_path_components(backup_wal_file_path,arclog_path,wal_file_name);

‎src/pg_probackup.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ main(int argc, char *argv[])
347347
elog(ERROR,"-B, --backup-path must be an absolute path");
348348

349349
if (IsSshConnection()
350-
&& (backup_subcmd==BACKUP_CMD||backup_subcmd==ADD_INSTANCE_CMD||backup_subcmd==RESTORE_CMD))
350+
&& (backup_subcmd==BACKUP_CMD||backup_subcmd==ADD_INSTANCE_CMD||backup_subcmd==RESTORE_CMD||
351+
backup_subcmd==ARCHIVE_PUSH_CMD||backup_subcmd==ARCHIVE_GET_CMD))
351352
{
352353
if (remote_agent) {
353354
if (backup_subcmd!=BACKUP_CMD) {
@@ -357,8 +358,8 @@ main(int argc, char *argv[])
357358
fio_redirect(STDIN_FILENO,STDOUT_FILENO);
358359
}else {
359360
/* Execute remote probackup */
360-
intstatus=remote_execute(argc,argv,backup_subcmd==BACKUP_CMD);
361-
if (status!=0)
361+
intstatus=remote_execute(argc,argv,backup_subcmd==BACKUP_CMD||backup_subcmd==ARCHIVE_PUSH_CMD);
362+
if (status!=0||backup_subcmd==ARCHIVE_PUSH_CMD)
362363
{
363364
returnstatus;
364365
}

‎src/pg_probackup.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ extern parray *dir_read_file_list(const char *root, const char *file_txt);
526526
externintdir_create_dir(constchar*path,mode_tmode);
527527
externbooldir_is_empty(constchar*path);
528528

529-
externboolfileExists(constchar*path,fio_locationlocation);
529+
externboolfileExists(constchar*path,fio_locationlocation);
530530
externsize_tpgFileSize(constchar*path);
531531

532532
externpgFile*pgFileNew(constchar*path,boolomit_symlink,fio_locationlocation);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp