returned the choice between S3 and pg_basebackup based on diff_in_bytes

This commit is contained in:
Oleksii Kliukin
2015-05-19 14:41:20 +02:00
parent d8d9da12ff
commit 9e25b3a78c
+1 -1
View File
@@ -187,7 +187,7 @@ class Postgresql:
conn and conn.close()
# if the size of the accumulated WAL segments is more than 5% of the backup size - we should use the pg_basebackup
return True or (diff_in_bytes < long(backup_size) * 0.05)
return diff_in_bytes < long(backup_size) * 0.05
def is_leader(self):
return not self.query('SELECT pg_is_in_recovery()').fetchone()[0]