From b154a5c155105fe8c2492292de61f1e46e6d3c2c Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Tue, 14 Mar 2017 22:52:15 +0900 Subject: [PATCH] repmgr: fix command line parsing with hostname as an additional argument Check explicitly whether -h/--hostname provided, otherwise PGHOST, if set, will be misinterpreted. --- repmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repmgr.c b/repmgr.c index 5d2d0932..a6bac2f7 100644 --- a/repmgr.c +++ b/repmgr.c @@ -758,7 +758,7 @@ main(int argc, char **argv) { if (optind < argc) { - if (runtime_options.host[0]) + if (runtime_options.host_param_provided == true) { PQExpBufferData additional_host_arg; initPQExpBuffer(&additional_host_arg);