mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
"standby clone": fix return codes
This commit is contained in:
@@ -330,7 +330,7 @@ do_standby_clone(void)
|
|||||||
|
|
||||||
|
|
||||||
/* If the backup failed then exit */
|
/* If the backup failed then exit */
|
||||||
if (r != 0)
|
if (r != SUCCESS)
|
||||||
{
|
{
|
||||||
/* If a replication slot was previously created, drop it */
|
/* If a replication slot was previously created, drop it */
|
||||||
if (config_file_options.use_replication_slots)
|
if (config_file_options.use_replication_slots)
|
||||||
@@ -1553,7 +1553,7 @@ static int
|
|||||||
run_basebackup(void)
|
run_basebackup(void)
|
||||||
{
|
{
|
||||||
char script[MAXLEN];
|
char script[MAXLEN];
|
||||||
int r = 0;
|
int r = SUCCESS;
|
||||||
PQExpBufferData params;
|
PQExpBufferData params;
|
||||||
TablespaceListCell *cell;
|
TablespaceListCell *cell;
|
||||||
t_basebackup_options backup_options = T_BASEBACKUP_OPTIONS_INITIALIZER;
|
t_basebackup_options backup_options = T_BASEBACKUP_OPTIONS_INITIALIZER;
|
||||||
@@ -1701,18 +1701,17 @@ run_basebackup(void)
|
|||||||
|
|
||||||
r = system(script);
|
r = system(script);
|
||||||
|
|
||||||
if (r !=0)
|
if (r != 0)
|
||||||
return r;
|
return ERR_BAD_BASEBACKUP;
|
||||||
|
|
||||||
|
return SUCCESS;
|
||||||
return r;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
run_file_backup(void)
|
run_file_backup(void)
|
||||||
{
|
{
|
||||||
int r = 0, i;
|
int r = SUCCESS, i;
|
||||||
|
|
||||||
char command[MAXLEN];
|
char command[MAXLEN];
|
||||||
char filename[MAXLEN];
|
char filename[MAXLEN];
|
||||||
@@ -1727,11 +1726,8 @@ run_file_backup(void)
|
|||||||
PQExpBufferData tablespace_map;
|
PQExpBufferData tablespace_map;
|
||||||
bool tablespace_map_rewrite = false;
|
bool tablespace_map_rewrite = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (mode == barman)
|
if (mode == barman)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Locate Barman's backup directory
|
* Locate Barman's backup directory
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user