1
0
mirror of https://github.com/postgrespro/pg_probackup.git synced 2025-01-19 11:30:07 +02:00

Use remote_host for pghost if last one was not specified

This commit is contained in:
Konstantin Knizhnik 2019-03-01 12:53:48 +03:00
parent 7c2260c05d
commit 42449fe895

View File

@ -448,7 +448,10 @@ main(int argc, char *argv[])
elog(ERROR, "Invalid backup-id \"%s\"", backup_id_string);
}
/* Setup stream options. They are used in streamutil.c. */
if (!instance_config.pghost && instance_config.remote.host)
instance_config.pghost = instance_config.remote.host;
/* Setup stream options. They are used in streamutil.c. */
if (instance_config.pghost != NULL)
dbhost = pstrdup(instance_config.pghost);
if (instance_config.pgport != NULL)