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:
Michael Banck
2021-09-17 14:45:32 +02:00
committed by GitHub
parent 7bd28250ca
commit 8a9e649aa1
+2
View File
@@ -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,