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

Commit9c2730a

Browse files
committed
Command changes. set-config/show-config instead of config command
1 parent0acc911 commit9c2730a

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

‎pg_probackup.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ main(int argc, char *argv[])
133133
backup_subcmd=SHOW;
134134
elseif (strcmp(argv[1],"delete")==0)
135135
backup_subcmd=DELETE;
136-
elseif (strcmp(argv[1],"config")==0)
137-
backup_subcmd=CONFIGURE;
136+
elseif (strcmp(argv[1],"set-config")==0)
137+
backup_subcmd=SET_CONFIG;
138+
elseif (strcmp(argv[1],"show-config")==0)
139+
backup_subcmd=SHOW_CONFIG;
138140
elseif (strcmp(argv[1],"--help")==0
139141
||strcmp(argv[1],"help")==0
140142
||strcmp(argv[1],"-?")==0)
@@ -170,7 +172,7 @@ main(int argc, char *argv[])
170172
elog(ERROR,"-B, --backup-path must be a path to directory");
171173

172174
/* Do not read options from file or env if we're going to set them */
173-
if (backup_subcmd!=CONFIGURE)
175+
if (backup_subcmd!=SET_CONFIG)
174176
{
175177
/* Read options from configuration file */
176178
join_path_components(path,backup_path,BACKUP_CATALOG_CONF_FILE);
@@ -248,12 +250,14 @@ main(int argc, char *argv[])
248250
returndo_retention_purge();
249251
else
250252
returndo_delete(current.backup_id);
251-
caseCONFIGURE:
252-
/* TODO fixit */
253+
caseSHOW_CONFIG:
254+
if (argc>4)
255+
elog(ERROR,"show-config command doesn't accept any options");
256+
returndo_configure(true);
257+
caseSET_CONFIG:
253258
if (argc==4)
254-
returndo_configure(true);
255-
else
256-
returndo_configure(false);
259+
elog(ERROR,"set-config command requires at least one option");
260+
returndo_configure(false);
257261
}
258262

259263
return0;

‎pg_probackup.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ typedef enum ProbackupSubcmd
107107
VALIDATE,
108108
SHOW,
109109
DELETE,
110-
CONFIGURE
110+
SET_CONFIG,
111+
SHOW_CONFIG
111112
}ProbackupSubcmd;
112113

113114
/* special values of pgBackup fields */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp