mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Check the exit code of the postgres start when determining whether to run the on_role_change callback.
This commit is contained in:
@@ -328,7 +328,7 @@ recovery_target_timeline = 'latest'
|
||||
# pg_rewind removes recovery.conf, we have to reinstate it.
|
||||
if ret:
|
||||
self.write_recovery_conf(leader)
|
||||
self.start()
|
||||
ret = self.start()
|
||||
else:
|
||||
self.remove_data_directory()
|
||||
logger.error("unable to rewind the former leader")
|
||||
|
||||
Reference in New Issue
Block a user