mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Add log before demoting (which can take some time) (#2057)
It can take some time for the demote to finish and it might not be obvious from looking at the logs what exactly is going on.
This commit is contained in:
@@ -826,6 +826,8 @@ class Ha(object):
|
||||
'immediate-nolock': dict(stop='immediate', checkpoint=False, release=False, offline=False, async_req=True),
|
||||
}[mode]
|
||||
|
||||
logger.info('Demoting self (%s)', mode)
|
||||
|
||||
self._rewind.trigger_check_diverged_lsn()
|
||||
self.state_handler.stop(mode_control['stop'], checkpoint=mode_control['checkpoint'],
|
||||
on_safepoint=self.watchdog.disable if self.watchdog.is_running else None,
|
||||
|
||||
Reference in New Issue
Block a user