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

Commit6e261cc

Browse files
committed
Read configuration before launching remote agent
1 parent8659fc6 commit6e261cc

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

‎src/pg_probackup.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,23 @@ main(int argc, char *argv[])
333333
if (!is_absolute_path(backup_path))
334334
elog(ERROR,"-B, --backup-path must be an absolute path");
335335

336+
/*
337+
* We read options from command line, now we need to read them from
338+
* configuration file since we got backup path and instance name.
339+
* For some commands an instance option isn't required, see above.
340+
*/
341+
if (instance_name)
342+
{
343+
charpath[MAXPGPATH];
344+
345+
/* Read environment variables */
346+
config_get_opt_env(instance_options);
347+
348+
/* Read options from configuration file */
349+
join_path_components(path,backup_instance_path,BACKUP_CATALOG_CONF_FILE);
350+
config_read_opt(path,instance_options,ERROR, true);
351+
}
352+
336353
if (IsSshProtocol()
337354
&& (backup_subcmd==BACKUP_CMD||backup_subcmd==ADD_INSTANCE_CMD||backup_subcmd==RESTORE_CMD||
338355
backup_subcmd==ARCHIVE_PUSH_CMD||backup_subcmd==ARCHIVE_GET_CMD))
@@ -392,23 +409,6 @@ main(int argc, char *argv[])
392409
}
393410
}
394411

395-
/*
396-
* We read options from command line, now we need to read them from
397-
* configuration file since we got backup path and instance name.
398-
* For some commands an instance option isn't required, see above.
399-
*/
400-
if (instance_name)
401-
{
402-
charpath[MAXPGPATH];
403-
404-
/* Read environment variables */
405-
config_get_opt_env(instance_options);
406-
407-
/* Read options from configuration file */
408-
join_path_components(path,backup_instance_path,BACKUP_CATALOG_CONF_FILE);
409-
config_read_opt(path,instance_options,ERROR, true);
410-
}
411-
412412
/* Initialize logger */
413413
init_logger(backup_path,&instance_config.logger);
414414

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp