Prevent "invalid LSN returned from node..." infinite loop

Currently in repmgrd3, if a repmgrd enters failover, but one or more other
repmgrds do not (e.g. partial primary invisibility), the repmgrd in failover
may enter an infinite loop waiting for the repmgrd(s) not in failover to
update shared memory.
This commit is contained in:
Ian Barwick
2019-02-21 14:18:50 +09:00
parent a4f572a1ff
commit 24a354c0a7
4 changed files with 82 additions and 29 deletions

View File

@@ -28,6 +28,8 @@
#include "strutil.h"
#define format_lsn(x) (uint32) (x >> 32), (uint32) x
typedef enum {
UNKNOWN = 0,
MASTER,
@@ -140,4 +142,9 @@ void create_checkpoint(PGconn *conn);
int get_node_replication_state(PGconn *conn, char *node_name, char *output);
t_server_type parse_node_type(const char *type);
int get_data_checksum_version(const char *data_directory);
/* backported from repmgr 4.x */
XLogRecPtr parse_lsn(const char *str);
XLogRecPtr get_last_wal_receive_location(PGconn *conn);
#endif