Regularly sync witness server repl_nodes table.

Although the witness server will resync the repl_nodes table following
a failover, other operations (e.g. removing or cloning a standby)
were previously not reflected in the witness server's copy of this
table.

As a short-term workaround, automatically resync the table at regular
intervals (defined by the configuration file parameter
"witness_repl_nodes_sync_interval_secs", default 30 seconds).
This commit is contained in:
Ian Barwick
2016-03-29 16:46:18 +09:00
parent 958e45f2b8
commit c48c248c15
7 changed files with 54 additions and 16 deletions

View File

@@ -1071,7 +1071,8 @@ do_master_register(void)
options.node_name,
options.conninfo,
options.priority,
repmgr_slot_name_ptr);
repmgr_slot_name_ptr,
true);
if (record_created == false)
{
@@ -1172,9 +1173,8 @@ do_standby_register(void)
options.node_name,
options.conninfo,
options.priority,
repmgr_slot_name_ptr);
repmgr_slot_name_ptr,
true);
if (record_created == false)
{
@@ -3784,7 +3784,8 @@ do_witness_create(void)
options.node_name,
options.conninfo,
options.priority,
NULL);
NULL,
true);
if (record_created == false)
{