mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Small bugfixes (#499)
* Short after promote synchronous replication was disabled even is synchronous_mode_strict is set * Create empty pg_ident.conf if it is missing after restoring from backup * Bump version
This commit is contained in:
committed by
GitHub
parent
d374882356
commit
4faec82380
+1
-1
@@ -364,7 +364,7 @@ class Ha(object):
|
||||
# Somebody else updated sync state, it may be due to us losing the lock. To be safe, postpone
|
||||
# promotion until next cycle. TODO: trigger immediate retry of run_cycle
|
||||
return 'Postponing promotion because synchronous replication state was updated by somebody else'
|
||||
self.state_handler.set_synchronous_standby(None)
|
||||
self.state_handler.set_synchronous_standby('*' if self.is_synchronous_mode_strict() else None)
|
||||
self.state_handler.promote()
|
||||
return promote_message
|
||||
|
||||
|
||||
@@ -1396,8 +1396,12 @@ class Postgresql(object):
|
||||
for f in self._configuration_to_save:
|
||||
config_file = os.path.join(self._config_dir, f)
|
||||
backup_file = os.path.join(self._data_dir, f + '.backup')
|
||||
if not os.path.isfile(config_file) and os.path.isfile(backup_file):
|
||||
shutil.copy(backup_file, config_file)
|
||||
if not os.path.isfile(config_file):
|
||||
if os.path.isfile(backup_file):
|
||||
shutil.copy(backup_file, config_file)
|
||||
# Previously we didn't backup pg_ident.conf, if file is missing just create empty
|
||||
elif f == 'pg_ident.conf':
|
||||
open(config_file, 'w').close()
|
||||
except IOError:
|
||||
logger.exception('unable to restore configuration files from backup')
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
__version__ = '1.3.2'
|
||||
__version__ = '1.3.3'
|
||||
|
||||
Reference in New Issue
Block a user