Log successful switchover event

This commit is contained in:
Ian Barwick
2017-08-03 17:02:30 +09:00
parent 112ca6321a
commit 7d77fd4072

View File

@@ -2015,6 +2015,20 @@ do_standby_switchover(void)
termPQExpBuffer(&remote_command_str);
/* TODO: verify this node's record was updated correctly */
create_event_record(local_conn,
&config_file_options,
config_file_options.node_id,
"standby_switchover",
true,
NULL);
PQfinish(local_conn);
log_notice(_("switchover was successful"));
log_detail(_("node \"%s\" is now primary"),
local_node_record.node_name);
return;
}