Skip to content

Commit 623ddbb

Browse files
committed
[PBCKP-146] Small fix for remote_agent
1 parent 585a069 commit 623ddbb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/pg_probackup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ bool perm_slot = false;
8686
/* backup options */
8787
bool backup_logs = false;
8888
bool smooth_checkpoint;
89-
char *remote_agent;
89+
bool remote_agent = false;
9090
static char *backup_note = NULL;
9191
/* catchup options */
9292
static char *catchup_source_pgdata = NULL;
@@ -361,6 +361,7 @@ main(int argc, char *argv[])
361361
elog(ERROR, "Version mismatch, pg_probackup binary with version '%s' "
362362
"is launched as an agent for pg_probackup binary with version '%s'",
363363
PROGRAM_VERSION, argv[2]);
364+
remote_agent = true;
364365
fio_communicate(STDIN_FILENO, STDOUT_FILENO);
365366
return 0;
366367
case HELP_CMD:

src/pg_probackup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ extern bool perm_slot;
774774
extern bool smooth_checkpoint;
775775

776776
/* remote probackup options */
777-
extern char* remote_agent;
777+
extern bool remote_agent;
778778

779779
/* delete options */
780780
extern bool delete_wal;

src/utils/configuration.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,6 @@ config_get_opt(int argc, char **argv, ConfigOption cmd_options[],
530530
opt = option_find(c, options);
531531

532532
if (opt
533-
&& !remote_agent
534533
&& opt->allowed < SOURCE_CMD && opt->allowed != SOURCE_CMD_STRICT)
535534
elog(ERROR, "Option %s cannot be specified in command line",
536535
opt->lname);

0 commit comments

Comments
 (0)