mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
Remove the second --port parameter, we now use repmgr.conf for get
conninfo of the standby
This commit is contained in:
15
repmgr.c
15
repmgr.c
@@ -56,7 +56,6 @@ bool force = false;
|
|||||||
|
|
||||||
int numport = 0;
|
int numport = 0;
|
||||||
char *masterport = NULL;
|
char *masterport = NULL;
|
||||||
char *standbyport = NULL;
|
|
||||||
|
|
||||||
char *server_mode = NULL;
|
char *server_mode = NULL;
|
||||||
char *server_cmd = NULL;
|
char *server_cmd = NULL;
|
||||||
@@ -109,18 +108,7 @@ main(int argc, char **argv)
|
|||||||
host = optarg;
|
host = optarg;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
numport++;
|
|
||||||
switch (numport)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
masterport = optarg;
|
masterport = optarg;
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
standbyport = optarg;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
fprintf(stderr, _("%s: too many parameters of same type; master and standby only\n"), progname);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'U':
|
case 'U':
|
||||||
username = optarg;
|
username = optarg;
|
||||||
@@ -231,9 +219,6 @@ main(int argc, char **argv)
|
|||||||
dbname = "postgres";
|
dbname = "postgres";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (standbyport == NULL)
|
|
||||||
standbyport = masterport;
|
|
||||||
|
|
||||||
keywords[2] = "user";
|
keywords[2] = "user";
|
||||||
values[2] = username;
|
values[2] = username;
|
||||||
keywords[3] = "dbname";
|
keywords[3] = "dbname";
|
||||||
|
|||||||
Reference in New Issue
Block a user