mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 08:56:29 +00:00
exit with status 2 if manual work is needed during standby_clone
This commit is contained in:
committed by
Greg Smith
parent
a02cd43115
commit
7e7c45c61d
31
repmgr.c
31
repmgr.c
@@ -970,30 +970,33 @@ stop_backup:
|
|||||||
|
|
||||||
/* If the rsync failed then exit */
|
/* If the rsync failed then exit */
|
||||||
if (r != 0)
|
if (r != 0)
|
||||||
exit(ERR_BAD_CONFIG);
|
exit(ERR_BAD_RSYNC);
|
||||||
|
|
||||||
if (runtime_options.verbose)
|
if (runtime_options.verbose)
|
||||||
printf(_("%s requires primary to keep WAL files %s until at least %s\n"),
|
printf(_("%s requires primary to keep WAL files %s until at least %s\n"),
|
||||||
progname, first_wal_segment, last_wal_segment);
|
progname, first_wal_segment, last_wal_segment);
|
||||||
|
|
||||||
/* we need to create the pg_xlog sub directory too, i'm reusing a variable here */
|
/* we need to create the pg_xlog sub directory too, i'm reusing a variable here */
|
||||||
snprintf(local_control_file, MAXFILENAME, "%s/pg_xlog", runtime_options.dest_dir);
|
snprintf(local_control_file, MAXFILENAME, "%s/pg_xlog", runtime_options.dest_dir);
|
||||||
if (!create_directory(local_control_file))
|
if (!create_directory(local_control_file))
|
||||||
{
|
{
|
||||||
log_err(_("%s: couldn't create directory %s, you will need to do it manually...\n"),
|
log_err(_("%s: couldn't create directory %s, you will need to do it manually...\n"),
|
||||||
progname, runtime_options.dest_dir);
|
progname, runtime_options.dest_dir);
|
||||||
}
|
r = ERR_NEEDS_XLOG; /* continue, but eventually exit returning error */
|
||||||
|
|
||||||
/* Finally, write the recovery.conf file */
|
|
||||||
create_recovery_file(runtime_options.dest_dir);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Finally, write the recovery.conf file */
|
||||||
|
create_recovery_file(runtime_options.dest_dir);
|
||||||
|
|
||||||
PQclear(res);
|
PQclear(res);
|
||||||
PQfinish(conn);
|
PQfinish(conn);
|
||||||
|
|
||||||
/* We don't start the service because we still may want to move the directory */
|
/*
|
||||||
return;
|
* We don't start the service yet because we still may want to
|
||||||
|
* move the directory
|
||||||
|
*/
|
||||||
|
|
||||||
|
exit(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1
repmgr.h
1
repmgr.h
@@ -51,6 +51,7 @@
|
|||||||
#define ERR_BAD_RSYNC 2
|
#define ERR_BAD_RSYNC 2
|
||||||
#define ERR_STOP_BACKUP 3
|
#define ERR_STOP_BACKUP 3
|
||||||
#define ERR_NO_RESTART 4
|
#define ERR_NO_RESTART 4
|
||||||
|
#define ERR_NEEDS_XLOG 5
|
||||||
|
|
||||||
/* Run time options type */
|
/* Run time options type */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user