From efe4a9c3442c54222cfa12e604b0152a505517f5 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Wed, 23 Jan 2019 13:15:38 +0900 Subject: [PATCH] repmgrd: log receipt of SIGINT/SIGTERM --- repmgrd-bdr.c | 4 +++- repmgrd-physical.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/repmgrd-bdr.c b/repmgrd-bdr.c index 7345a271..14104849 100644 --- a/repmgrd-bdr.c +++ b/repmgrd-bdr.c @@ -43,10 +43,12 @@ handle_sigint_bdr(SIGNAL_ARGS) initPQExpBuffer(&event_details); appendPQExpBuffer(&event_details, - "%s signal received", + _("%s signal received"), postgres_signal_arg == SIGTERM ? "TERM" : "INT"); + log_notice("%s", event_details.data); + create_event_notification(local_conn, &config_file_options, config_file_options.node_id, diff --git a/repmgrd-physical.c b/repmgrd-physical.c index b18ac852..5dc0a10a 100644 --- a/repmgrd-physical.c +++ b/repmgrd-physical.c @@ -99,10 +99,12 @@ handle_sigint_physical(SIGNAL_ARGS) initPQExpBuffer(&event_details); appendPQExpBuffer(&event_details, - "%s signal received", + _("%s signal received"), postgres_signal_arg == SIGTERM ? "TERM" : "INT"); + log_notice("%s", event_details.data); + if (local_node_info.type == PRIMARY) writeable_conn = local_conn; else