mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-03-17 21:18:00 +02:00
bugfix: correctly log cmdline to logfile
This commit is contained in:
parent
dd18928e19
commit
9ac30ada54
@ -331,15 +331,6 @@ main(int argc, char *argv[])
|
||||
if (rc != -1 && !S_ISDIR(stat_buf.st_mode))
|
||||
elog(ERROR, "-B, --backup-path must be a path to directory");
|
||||
|
||||
/* command was initialized for a few commands */
|
||||
if (command)
|
||||
{
|
||||
elog_file(INFO, "command: %s", command);
|
||||
|
||||
pfree(command);
|
||||
command = NULL;
|
||||
}
|
||||
|
||||
/* Option --instance is required for all commands except init and show */
|
||||
if (backup_subcmd != INIT_CMD && backup_subcmd != SHOW_CMD &&
|
||||
backup_subcmd != VALIDATE_CMD)
|
||||
@ -390,6 +381,15 @@ main(int argc, char *argv[])
|
||||
/* Initialize logger */
|
||||
init_logger(backup_path, &instance_config.logger);
|
||||
|
||||
/* command was initialized for a few commands */
|
||||
if (command)
|
||||
{
|
||||
elog_file(INFO, "command: %s", command);
|
||||
|
||||
pfree(command);
|
||||
command = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* We have read pgdata path from command line or from configuration file.
|
||||
* Ensure that pgdata is an absolute path.
|
||||
|
Loading…
x
Reference in New Issue
Block a user