EnterpriseDB/repmgr

bug :repmgrd_upstream_disconnect event not call the event_notification_command

Opened this issue · 0 comments

repmgrd_upstream_disconnect event not call the event_notification_command

I want the repmgrd_upstream_disconnect event information to calculate the failover time, but the repmgrd_upstream_disconnect not notification;
repmgrd_upstream_disconnect event log:

[2022-09-02 14:20:55] [WARNING] unable to ping "host=192.168.0.4 port=5432 user=repmgr dbname=repmgr connect_timeout=2" [2022-09-02 14:20:55] [DETAIL] PQping() returned "PQPING_NO_RESPONSE" [2022-09-02 14:20:55] [DEBUG] _create_event(): event is "repmgrd_upstream_disconnect" for node 1 [2022-09-02 14:20:55] [DEBUG] _create_event(): Event timestamp is "2022-09-02 14:20:55+0800" [2022-09-02 14:20:55] [WARNING] unable to connect to upstream node "192.168.0.4:5432" (ID: 2) [2022-09-02 14:20:55] [INFO] checking state of node "192.168.0.4:5432" (ID: 2), 1 of 4 attempts
other event log:

[2022-09-02 14:19:17] [DEBUG] _create_event(): event is "repmgrd_start" for node 1 [2022-09-02 14:19:17] [DEBUG] get_recovery_type(): SELECT pg_catalog.pg_is_in_recovery() [2022-09-02 14:19:17] [DEBUG] _create_event(): INSERT INTO repmgr.events ( node_id, event, successful, details ) VALUES ($1, $2, $3, $4) RETURNING event_timestamp [2022-09-02 14:19:17] [DEBUG] _create_event(): Event timestamp is "2022-09-02 14:19:17.316855+08" [2022-09-02 14:19:17] [DEBUG] _create_event(): command is '/data/jw/pg/pgagent-package/bin/tool repmgrcallback --prodInstId 10001 --eventType %e --result %s --switchTime "%t" --details "%d" --url http://127.0.0.1:1210/switch'

code in repmgrd-physical.c:1598 call function create_event_record to notify event,but the function create_event_record is not the notification function ,so the repmgrd_upstream_disconnect event not call the notification script , the repmgrd_upstream_disconnect event sholud call the create_event_notification to notifiy

image

image

image

image

image