mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Try to guess the postgres role before it is started by examinging the recovery.conf.
This commit is contained in:
@@ -79,7 +79,7 @@ class Postgresql(object):
|
||||
|
||||
self._state = 'stopped'
|
||||
self._state_lock = Lock()
|
||||
self._role = 'replica'
|
||||
self._role = 'replica' if os.path.exists(self.recovery_conf) else 'master'
|
||||
self._role_lock = Lock()
|
||||
|
||||
if self.is_running():
|
||||
|
||||
Reference in New Issue
Block a user