repmgr: initialise "voting_term" in "repmgr primary register"

This previously happened in the extension SQL code, which could
potentially cause replay problems if installing on a BDR cluster.

As this table is only required for streaming replication failover,
move the initialisation to "repmgr primary register".

Addresses GitHub #344 .
This commit is contained in:
Ian Barwick
2017-11-28 10:51:32 +09:00
parent d3c47f450f
commit 270da1294c
5 changed files with 40 additions and 8 deletions

View File

@@ -56,6 +56,7 @@
#define NO_UPSTREAM_NODE -1
#define UNKNOWN_NODE_ID -1
#define VOTING_TERM_NOT_SET -1
/*
* various default values - ensure repmgr.conf.sample is update