After the introduction of incremental backups in Postgres 17, there is the need to review how we display information about backups, specially when using the show-backup command. Because of this need, we are adding the cluster size field to the backup.info.
This new field is intended to be used in the calculation of the deduplication_ratio of backups and to show the estimated size of the Postgres cluster at the time the backup was taken. For this, we are reusing an existing property of the PostgreSQLConnection class called current_size.
The tests broken by the changes on the code were fixed.
Unit tests for the current_size property were added because they were found to missing from the test suite and the unit test for the _pg_get_metadata method of the BackupStrategy class was extended because of the changes in the method.
After the introduction of incremental backups in Postgres 17, there is the need to review how we display information about backups, specially when using the
show-backup
command. Because of this need, we are adding thecluster size
field to the backup.info. This new field is intended to be used in the calculation of the deduplication_ratio of backups and to show the estimated size of the Postgres cluster at the time the backup was taken. For this, we are reusing an existing property of thePostgreSQLConnection
class calledcurrent_size
.The tests broken by the changes on the code were fixed.
Unit tests for the
current_size
property were added because they were found to missing from the test suite and the unit test for the_pg_get_metadata
method of theBackupStrategy
class was extended because of the changes in the method.References: BAR-215