8000 bugfix: correctly log cmdline to logfile · postgrespro/pg_probackup@9ac30ad · GitHub
[go: up one dir, main page]

Skip to content

Commit 9ac30ad

Browse files
committed
bugfix: correctly log cmdline to logfile
1 parent dd18928 commit 9ac30ad

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/pg_probackup.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -331,15 +331,6 @@ main(int argc, char *argv[])
331331
if (rc != -1 && !S_ISDIR(stat_buf.st_mode))
332332
elog(ERROR, "-B, --backup-path must be a path to directory");
333333

334-
/* command was initialized for a few commands */
335-
if (command)
336-
{
337-
elog_file(INFO, "command: %s", command);
338-
339-
pfree(command);
340-
command = NULL;
341-
}
342-
343334
/* Option --instance is required for all commands except init and show */
344335
if (backup_subcmd != INIT_CMD && backup_subcmd != SHOW_CMD &&
345336
backup_subcmd != VALIDATE_CMD)
@@ -390,6 +381,15 @@ main(int argc, char *argv[])
390381
/* Initialize logger */
391382
init_logger(backup_path, &instance_config.logger);
392383

384+
/* command was initialized for a few commands */
385+
if (command)
386+
{
387+
elog_file(INFO, "command: %s", command);
388+
389+
pfree(command);
390+
command = NULL;
391+
}
392+
393393
/*
394394
* We have read pgdata path from command line or from configuration file.
395395
* Ensure that pgdata is an absolute path.

0 commit comments

Comments
 (0)
0