diff --git a/dbutils.c b/dbutils.c index ec0372f6..799b94af 100644 --- a/dbutils.c +++ b/dbutils.c @@ -854,11 +854,11 @@ get_server_version(PGconn *conn, char *server_version) } -t_recovery_type +RecoveryType get_recovery_type(PGconn *conn) { PGresult *res; - t_recovery_type recovery_type = RECTYPE_MASTER; + RecoveryType recovery_type = RECTYPE_MASTER; char *sqlquery = "SELECT pg_catalog.pg_is_in_recovery()"; @@ -946,7 +946,7 @@ _get_master_connection(PGconn *conn, for (i = 0; i < PQntuples(res); i++) { - t_recovery_type recovery_type; + RecoveryType recovery_type; /* initialize with the values of the current node being processed */ node_id = atoi(PQgetvalue(res, i, 0)); @@ -1079,7 +1079,7 @@ bool atobool(const char *value) /* extension functions */ /* =================== */ -t_extension_status +ExtensionStatus get_repmgr_extension_status(PGconn *conn) { PQExpBufferData query; diff --git a/dbutils.h b/dbutils.h index ced83ad1..8f6dce14 100644 --- a/dbutils.h +++ b/dbutils.h @@ -28,13 +28,13 @@ typedef enum { REPMGR_AVAILABLE, REPMGR_UNAVAILABLE, REPMGR_UNKNOWN -} t_extension_status; +} ExtensionStatus; typedef enum { RECTYPE_UNKNOWN = 0, RECTYPE_MASTER, RECTYPE_STANDBY -} t_recovery_type; +} RecoveryType; typedef enum { RECORD_ERROR = -1, @@ -188,11 +188,11 @@ bool get_pg_setting(PGconn *conn, const char *setting, char *output); /* server information functions */ bool get_cluster_size(PGconn *conn, char *size); int get_server_version(PGconn *conn, char *server_version); -t_recovery_type get_recovery_type(PGconn *conn); +RecoveryType get_recovery_type(PGconn *conn); int get_master_node_id(PGconn *conn); /* extension functions */ -t_extension_status get_repmgr_extension_status(PGconn *conn); +ExtensionStatus get_repmgr_extension_status(PGconn *conn); /* result functions */ bool atobool(const char *value); diff --git a/repmgr-action-master.c b/repmgr-action-master.c index a264ce47..baeea8a4 100644 --- a/repmgr-action-master.c +++ b/repmgr-action-master.c @@ -24,7 +24,7 @@ do_master_register(void) PGconn *conn = NULL; PGconn *master_conn = NULL; int current_master_id = UNKNOWN_NODE_ID; - t_recovery_type recovery_type; + RecoveryType recovery_type; t_node_info node_info = T_NODE_INFO_INITIALIZER; RecordStatus record_status; @@ -377,7 +377,7 @@ do_master_unregister(void) else { bool can_unregister = true; - t_recovery_type recovery_type = get_recovery_type(target_node_conn); + RecoveryType recovery_type = get_recovery_type(target_node_conn); /* Node appears to be a standby */ if (recovery_type == RECTYPE_STANDBY) diff --git a/repmgr-action-standby.c b/repmgr-action-standby.c index cfe5bf7e..24e6385d 100644 --- a/repmgr-action-standby.c +++ b/repmgr-action-standby.c @@ -1042,7 +1042,7 @@ do_standby_promote(void) char script[MAXLEN]; - t_recovery_type recovery_type; + RecoveryType recovery_type; int r; char data_dir[MAXLEN]; @@ -1584,7 +1584,7 @@ check_source_server() char cluster_size[MAXLEN]; t_node_info node_record = T_NODE_INFO_INITIALIZER; RecordStatus record_status; - t_extension_status extension_status; + ExtensionStatus extension_status; /* Attempt to connect to the upstream server to verify its configuration */ log_info(_("connecting to upstream node")); @@ -2993,7 +2993,7 @@ check_master_standby_version_match(PGconn *conn, PGconn *master_conn) static void check_recovery_type(PGconn *conn) { - t_recovery_type recovery_type = get_recovery_type(conn); + RecoveryType recovery_type = get_recovery_type(conn); if (recovery_type != RECTYPE_STANDBY) { diff --git a/repmgr-client.c b/repmgr-client.c index 321b8e5e..f7fe5c7e 100644 --- a/repmgr-client.c +++ b/repmgr-client.c @@ -1276,7 +1276,7 @@ create_repmgr_extension(PGconn *conn) PQExpBufferData query; PGresult *res; - t_extension_status extension_status; + ExtensionStatus extension_status; t_connection_user userinfo; bool is_superuser = false; diff --git a/repmgrd.c b/repmgrd.c index a17dfa71..ab0c9057 100644 --- a/repmgrd.c +++ b/repmgrd.c @@ -239,7 +239,7 @@ main(int argc, char **argv) * means we're dealing with a supported installation. * * The absence of a node record will also indicate that either the node - * or repmgr has note been properly configured. + * or repmgr has not been properly configured. */ /* Retrieve record for this node from the local database */