Check the exit code of the postgres start when determining whether to run the on_role_change callback.

This commit is contained in:
Oleksii Kliukin
2015-09-24 11:34:28 +02:00
parent 793325cb60
commit c8108f221e
+1 -1
View File
@@ -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")