EnterpriseDB / repmgr

A lightweight replication manager for PostgreSQL (Postgres)

Home Page:https://repmgr.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node_rejoin event

thamerlan opened this issue · comments

Hey.
I want to catch an event on the former primary during the switchover.
node_rejoin event is a right one, based on the documentation .
My repmgr.conf has

event_notification_command='/pathto/repmgr_extra_events.sh %e %s'
event_notifications='standby_promote,node_rejoin'

on all nodes.

repmgr_extra_events.sh :

#!/bin/bash
repmgr_extra_event_type=$1
repmgr_extra_event_status=$2

if [ x"${repmgr_extra_event_type}" == xstandby_promote ]; then
   echo "$(date --utc +"%Y-%m-%d %H:%M:%S %Z"): $repmgr_extra_event_type" >> /var/lib/postgresql/debug_repmgr.log
fi

if [ x"${repmgr_extra_event_type}" == xnode_rejoin ]; then
   echo "$(date --utc +"%Y-%m-%d %H:%M:%S %Z"): $repmgr_extra_event_type" >> /var/lib/postgresql/debug_repmgr.log
fi

On the new primary I see a call for standby_promote, but there is nothing for node_rejoin on the old primary.

What am I doing wrong?