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 de34e4e89b
commit 472d703d2e
5 changed files with 40 additions and 8 deletions

View File

@@ -91,9 +91,6 @@ CREATE RULE voting_term_delete AS
ON DELETE TO repmgr.voting_term
DO INSTEAD NOTHING;
/* XXX do this in "repmgr primary register" */
INSERT INTO repmgr.voting_term (term) VALUES (1);
/* ================= */
/* repmgrd functions */