mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
autodetect the host role during start from the existence of recovery.conf.
This commit is contained in:
@@ -245,6 +245,10 @@ class Postgresql:
|
||||
ret = subprocess.call(self._pg_ctl + ['start', '-o', self.server_options()]) == 0
|
||||
ret and self.load_replication_slots()
|
||||
self.save_configuration_files()
|
||||
if os.path.exists(self.recovery_conf):
|
||||
self.on_change_callback('replica')
|
||||
else:
|
||||
self.on_change_callback('master')
|
||||
return ret
|
||||
|
||||
def stop(self):
|
||||
|
||||
Reference in New Issue
Block a user