Closed andremagui closed 3 months ago
I run a test with the code and it seems to do what is required. I can see the summarize_wal
with the correct value in both of my Postgres 17 servers (one with rsync, another with postgres method), and I can see None
for the Postgres 16 server:
$ find ~/ -type f -name "backup.info" -print -exec bash -c "grep summarize_wal {}; echo" \;
/home/vagrant/barman_home/pg17-postgres-default/base/20240610T182147/backup.info
summarize_wal=on
/home/vagrant/barman_home/pg17-rsync/base/20240610T182149/backup.info
summarize_wal=on
/home/vagrant/barman_home/pg16-postgres-default/base/20240610T182145/backup.info
summarize_wal=None
Let me check the code and commits as well.
@gcalacoci for some reason the SonarQube scan is failing 🤔 (since a few runs already: https://github.com/EnterpriseDB/barman/actions/workflows/sonarqube-scan.yml). I wonder if we need to report this to Foundation team? I guess so given the nature of the issue:
java.lang.UnsupportedClassVersionError: org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
With postgres major version >= 17, we have the possibility to do incremental backups with pg_basebackup.
A crucial element for enabling this functionality is the WAL summarizer process. This is a recent addition, designed to assist incremental backups by identifying the differences in the data directory since the previous backup.
A new field was added in configuration file
postgresql.conf
calledsummarize_wal
. This field handles the state of the process (on or off).This commit adds a new field called summarize_wal to the backup.info metadata.
For postgres versions prior to 17, this field will remain as
None
.Unit tests updated accordingly.
References: BAR-172.
Signed-off-by: Andre Marchesini de Aguiar andre.marchesini@enterprisedb.com