mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Don't try to run crash recovery if postgres is running (#2298)
It was a minor oversight of #2252 and didn't get to a release
This commit is contained in:
+2
-1
@@ -307,7 +307,8 @@ class Ha(object):
|
||||
|
||||
if self._rewind.can_rewind:
|
||||
# rewind is required, but postgres wasn't shut down cleanly.
|
||||
if self.state_handler.controldata().get('Database cluster state') == 'in archive recovery':
|
||||
if not self.state_handler.is_running() and \
|
||||
self.state_handler.controldata().get('Database cluster state') == 'in archive recovery':
|
||||
msg = self._handle_crash_recovery()
|
||||
if msg:
|
||||
return msg
|
||||
|
||||
Reference in New Issue
Block a user