mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 07:06:30 +00:00
Ensure all node record structures are initialised
This commit is contained in:
25
dbutils.h
25
dbutils.h
@@ -52,18 +52,6 @@ typedef struct s_node_info
|
||||
} t_node_info;
|
||||
|
||||
|
||||
/*
|
||||
* Struct to store replication slot information
|
||||
*/
|
||||
|
||||
typedef struct s_replication_slot
|
||||
{
|
||||
char slot_name[MAXLEN];
|
||||
char slot_type[MAXLEN];
|
||||
bool active;
|
||||
} t_replication_slot;
|
||||
|
||||
|
||||
#define T_NODE_INFO_INITIALIZER { \
|
||||
NODE_NOT_FOUND, \
|
||||
NO_UPSTREAM_NODE, \
|
||||
@@ -78,6 +66,19 @@ typedef struct s_replication_slot
|
||||
InvalidXLogRecPtr \
|
||||
}
|
||||
|
||||
/*
|
||||
* Struct to store replication slot information
|
||||
*/
|
||||
|
||||
typedef struct s_replication_slot
|
||||
{
|
||||
char slot_name[MAXLEN];
|
||||
char slot_type[MAXLEN];
|
||||
bool active;
|
||||
} t_replication_slot;
|
||||
|
||||
|
||||
|
||||
PGconn *_establish_db_connection(const char *conninfo,
|
||||
const bool exit_on_error,
|
||||
const bool log_notice);
|
||||
|
||||
7
repmgr.c
7
repmgr.c
@@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* repmgr.c - Command interpreter for the repmgr package
|
||||
* Copyright (C) 2ndQuadrant, 2010-2016
|
||||
@@ -1128,7 +1127,7 @@ do_standby_register(void)
|
||||
int ret;
|
||||
|
||||
bool record_created;
|
||||
t_node_info node_record;
|
||||
t_node_info node_record = T_NODE_INFO_INITIALIZER;
|
||||
int node_result;
|
||||
|
||||
log_info(_("connecting to standby database\n"));
|
||||
@@ -2762,7 +2761,7 @@ do_standby_switchover(void)
|
||||
|
||||
char repmgr_db_cli_params[MAXLEN] = "";
|
||||
int query_result;
|
||||
t_node_info remote_node_record;
|
||||
t_node_info remote_node_record = T_NODE_INFO_INITIALIZER;
|
||||
bool connection_success,
|
||||
shutdown_success;
|
||||
|
||||
@@ -3455,7 +3454,7 @@ do_standby_switchover(void)
|
||||
|
||||
if (options.use_replication_slots)
|
||||
{
|
||||
t_node_info local_node_record;
|
||||
t_node_info local_node_record = T_NODE_INFO_INITIALIZER;
|
||||
|
||||
query_result = get_node_record(local_conn, options.cluster_name, options.node, &local_node_record);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user