From 7d77fd4072d570d3d8f6206c499484f4747074c7 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Thu, 3 Aug 2017 17:02:30 +0900 Subject: [PATCH] Log successful switchover event --- repmgr-action-standby.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/repmgr-action-standby.c b/repmgr-action-standby.c index feb8b3c9..40d0a5ed 100644 --- a/repmgr-action-standby.c +++ b/repmgr-action-standby.c @@ -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; }