mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
repmgr: standby register --wait-sync=0 can loop infinitely
This commit is contained in:
4
repmgr.c
4
repmgr.c
@@ -2296,7 +2296,9 @@ do_standby_register(void)
|
||||
|
||||
/* if --wait-sync option set, wait for the records to synchronise */
|
||||
|
||||
if (PQstatus(conn) == CONNECTION_OK && runtime_options.wait_register_sync)
|
||||
if (PQstatus(conn) == CONNECTION_OK &&
|
||||
runtime_options.wait_register_sync == true &&
|
||||
runtime_options.wait_register_sync_seconds > 0)
|
||||
{
|
||||
bool sync_ok = false;
|
||||
int timer = 0;
|
||||
|
||||
10
repmgr.h
10
repmgr.h
@@ -113,13 +113,15 @@ typedef struct
|
||||
bool no_conninfo_password;
|
||||
bool copy_external_config_files;
|
||||
int copy_external_config_files_destination;
|
||||
bool wait_register_sync;
|
||||
int wait_register_sync_seconds;
|
||||
char upstream_conninfo[MAXLEN];
|
||||
char replication_user[MAXLEN];
|
||||
|
||||
char recovery_min_apply_delay[MAXLEN];
|
||||
|
||||
/* standby register paarameters */
|
||||
bool wait_register_sync;
|
||||
int wait_register_sync_seconds;
|
||||
|
||||
/* witness create parameters */
|
||||
bool witness_pwprompt;
|
||||
|
||||
@@ -156,7 +158,9 @@ typedef struct
|
||||
false, false, false, \
|
||||
/* standby clone parameters */ \
|
||||
false, DEFAULT_WAL_KEEP_SEGMENTS, false, false, false, false, false, false, \
|
||||
false, CONFIG_FILE_SAMEPATH, false, 0, "", "", "", \
|
||||
false, CONFIG_FILE_SAMEPATH, "", "", "", \
|
||||
/* standby register paarameters */ \
|
||||
false, 0, \
|
||||
/* witness create parameters */ \
|
||||
false, \
|
||||
/* standby follow parameters */ \
|
||||
|
||||
Reference in New Issue
Block a user