diff --git a/README.rst b/README.rst index 2fdbae19..9ececa07 100644 --- a/README.rst +++ b/README.rst @@ -1072,16 +1072,19 @@ Error codes When the repmgr or repmgrd program exits, it will set one of the following -* SUCCESS 0: Program ran successfully. -* ERR_BAD_CONFIG 1: One of the configuration checks the program makes failed. -* ERR_BAD_RSYNC 2: An rsync call made by the program returned an error. -* ERR_STOP_BACKUP 3: A ``pg_stop_backup()`` call made by the program didn't succeed. -* ERR_NO_RESTART 4: An attempt to restart a PostgreSQL instance failed. -* ERR_NEEDS_XLOG 5: Could note create the ``pg_xlog`` directory when cloning. -* ERR_DB_CON 6: Error when trying to connect to a database. -* ERR_DB_QUERY 7: Error executing a database query. -* ERR_PROMOTED 8: Exiting program because the node has been promoted to master. -* ERR_BAD_PASSWORD 9: Password used to connect to a database was rejected. +* SUCCESS (0) Program ran successfully. +* ERR_BAD_CONFIG (1) One of the configuration checks the program makes failed. +* ERR_BAD_RSYNC (2) An rsync call made by the program returned an error. +* ERR_NO_RESTART (4) An attempt to restart a PostgreSQL instance failed. +* ERR_DB_CON (6) Error when trying to connect to a database. +* ERR_DB_QUERY (7) Error executing a database query. +* ERR_PROMOTED (8) Exiting program because the node has been promoted to master. +* ERR_BAD_PASSWORD (9) Password used to connect to a database was rejected. +* ERR_STR_OVERFLOW (10) String overflow error +* ERR_FAILOVER_FAIL (11) Error encountered during failover (repmgrd only) +* ERR_BAD_SSH (12) Error when connecting to remote host via SSH +* ERR_SYS_FAILURE (13) Error when forking (repmgrd only) +* ERR_BAD_BASEBACKUP (14) Error when executing pg_basebackup License and Contributions ========================= diff --git a/errcode.h b/errcode.h index a4ae1454..00758f12 100644 --- a/errcode.h +++ b/errcode.h @@ -25,9 +25,7 @@ #define SUCCESS 0 #define ERR_BAD_CONFIG 1 #define ERR_BAD_RSYNC 2 -#define ERR_STOP_BACKUP 3 #define ERR_NO_RESTART 4 -#define ERR_NEEDS_XLOG 5 #define ERR_DB_CON 6 #define ERR_DB_QUERY 7 #define ERR_PROMOTED 8 @@ -36,5 +34,6 @@ #define ERR_FAILOVER_FAIL 11 #define ERR_BAD_SSH 12 #define ERR_SYS_FAILURE 13 +#define ERR_BAD_BASEBACKUP 14 #endif /* _ERRCODE_H_ */ diff --git a/repmgr.c b/repmgr.c index 734e5889..82b3aa30 100644 --- a/repmgr.c +++ b/repmgr.c @@ -1137,7 +1137,7 @@ stop_backup: log_err(_("Unable to take a base backup of the primary server\n")); log_warning(_("The destination directory (%s) will need to be cleaned up manually\n"), local_data_directory); - exit(ERR_BAD_RSYNC); + exit(ERR_BAD_BASEBACKUP); } log_notice(_("%s base backup of standby complete\n"), progname);