Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node_rejoin event #837

Open
thamerlan opened this issue Jan 15, 2024 · 0 comments
Open

node_rejoin event #837

thamerlan opened this issue Jan 15, 2024 · 0 comments

Comments

@thamerlan
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant