pg_auto_failover icon indicating copy to clipboard operation
pg_auto_failover copied to clipboard

Promotion refusal log names the wrong setting

Open Sajish85 opened this issue 1 week ago • 0 comments

Hi. Small bug in a log message.

When the monitor refuses to promote a standby because it is too far behind, the log line says the limit is pgautofailover.enable_sync_wal_log_threshold.

But the check in the code does not use that setting. In src/monitor/group_state_machine.c the comparison uses PromoteXlogThreshold, which is pgautofailover.promote_wal_log_threshold.

So if an operator reads the log and changes the setting it names, nothing changes. The setting that matters is the other one.

Found on v2.2 while I was testing failover behaviour. The gate itself works fine — this is only about the log text.

Fix idea: make the log line name promote_wal_log_threshold. Happy to send a patch if you want one.

Sajish85 avatar Nov 23 '26 13:11 Sajish85