Handle failover of top-level standby

Cascaded standbys will not go into failover so we need to ignore
these when looking for candidates for promotion.
This commit is contained in:
Ian Barwick
2015-01-16 12:35:01 +09:00
parent a82d37e48a
commit 609453a848
4 changed files with 123 additions and 13 deletions

View File

@@ -21,9 +21,11 @@
#define _REPMGR_H_
#include "postgres_fe.h"
#include "getopt_long.h"
#include "libpq-fe.h"
#include "getopt_long.h"
#include "strutil.h"
#include "dbutils.h"
#include "errcode.h"
@@ -53,6 +55,17 @@
#define AUTOMATIC_FAILOVER 1
#define NO_UPSTREAM_NODE -1
typedef enum {
UNKNOWN = 0,
PRIMARY,
STANDBY,
WITNESS
} t_server_type;
/* Run time options type */
typedef struct
{