mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 15:16:29 +00:00
Compare commits
7 Commits
v1.2.0
...
REL1_1_STA
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e04ba8bea5 | ||
|
|
031f9aedcc | ||
|
|
8ee715b657 | ||
|
|
c2344fe843 | ||
|
|
30b124e91f | ||
|
|
c00fa9f9ba | ||
|
|
d36ee899dc |
5
HISTORY
5
HISTORY
@@ -31,7 +31,10 @@
|
||||
1.1.0 2011-03-09
|
||||
Make options -U, -R and -p not mandatory (Jaime)
|
||||
|
||||
1.1.1 2011-XX-XX
|
||||
1.1.1 2012-04-18
|
||||
Add --ignore-rsync-warning (Cédric)
|
||||
Add strnlen for compatibility with OS X (Greg)
|
||||
Improve performance of repl_status view (Jaime)
|
||||
Remove last argument from log_err (Jaime, Reported by Jeroen Dekkers)
|
||||
Complete documentation about possible error conditions (Jaime)
|
||||
Document how to clean history (Jaime)
|
||||
|
||||
18
repmgr.c
18
repmgr.c
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/wait.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -117,7 +118,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
|
||||
while ((c = getopt_long(argc, argv, "d:h:p:U:D:f:R:w:F:I:v", long_options,
|
||||
while ((c = getopt_long(argc, argv, "d:h:p:U:D:f:R:w:FIv", long_options,
|
||||
&optindex)) != -1)
|
||||
{
|
||||
switch (c)
|
||||
@@ -232,7 +233,7 @@ main(int argc, char **argv)
|
||||
break;
|
||||
default:
|
||||
log_err(_("%s: too many command-line arguments (first extra is \"%s\")\n"),
|
||||
progname, argv[optind + 1]);
|
||||
progname, argv[optind]);
|
||||
usage();
|
||||
exit(ERR_BAD_CONFIG);
|
||||
}
|
||||
@@ -861,6 +862,7 @@ do_standby_clone(void)
|
||||
PQfinish(conn);
|
||||
exit(ERR_BAD_CONFIG);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* Trouble accessing directory */
|
||||
log_err(_("%s: could not access directory \"%s\": %s\n"),
|
||||
@@ -887,6 +889,16 @@ do_standby_clone(void)
|
||||
PQfinish(conn);
|
||||
exit(ERR_BAD_CONFIG);
|
||||
}
|
||||
|
||||
/* We need all 4 parameters, and they can be retrieved only by superusers */
|
||||
if (PQntuples(res) != 4)
|
||||
{
|
||||
log_err("%s: STANDBY CLONE should be run by a SUPERUSER\n", progname);
|
||||
PQclear(res);
|
||||
PQfinish(conn);
|
||||
exit(ERR_BAD_CONFIG);
|
||||
}
|
||||
|
||||
for (i = 0; i < PQntuples(res); i++)
|
||||
{
|
||||
if (strcmp(PQgetvalue(res, i, 0), "data_directory") == 0)
|
||||
@@ -1476,7 +1488,7 @@ copy_remote_files(char *host, char *remote_user, char *remote_path,
|
||||
maxlen_snprintf(rsync_flags, "%s", options.rsync_options);
|
||||
|
||||
if (runtime_options.force)
|
||||
strcat(rsync_flags, " --delete");
|
||||
strcat(rsync_flags, " --delete --checksum");
|
||||
|
||||
if (!remote_user[0])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user