Despite upgrading to barman-cloud 0.11.0, the barman-cloud sidecar memory keeps growing during a ScheduledBackup (plugin method) and never shrinks.
Database size: 21.1 GiB.
ScheduledBackup completes without unbounded memory growth in the barman-cloud sidecar.
During ScheduledBackup, the barman-cloud sidecar memory usage keeps increasing over time.
{"level":"info","ts":"2026-02-09T00:02:00.654902071Z","msg":"Starting backup","logging_pod":"<redacted>"}
{"level":"info","ts":"2026-02-09T00:02:00.67376384Z","msg":"Starting barman-cloud-backup","logging_pod":"<redacted>","options":["--user","postgres","--name","backup-20260209000200","--cloud-provider","azure-blob-storage","--credential","managed-identity","https://<redacted>/backup","<redacted>"]}
{"level":"info","ts":"2026-02-09T00:02:01.025849551Z","logger":"barman-cloud-backup","msg":"/venv/lib/python3.13/site-packages/barman/cloud.py:231: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in staticmethod() if you want to preserve the old behavior","pipe":"stderr","logging_pod":"<redacted>"}
{"level":"info","ts":"2026-02-09T00:02:01.025866821Z","logger":"barman-cloud-backup","msg":" self.buffer = self._buffer()","pipe":"stderr","logging_pod":"<redacted>"}
{"level":"info","ts":"2026-02-09T00:05:12.4727951Z","msg":"Executing barman-cloud-wal-archive","logging_pod":"<redacted>","walName":"/var/lib/postgresql/data/pgdata/pg_wal/<redacted>","options":["--cloud-provider","azure-blob-storage","--credential","managed-identity","https://<redacted>/backup","<redacted>","/var/lib/postgresql/data/pgdata/pg_wal/<redacted>"]}
{"level":"info","ts":"2026-02-09T00:05:13.31387298Z","msg":"Archived WAL file","walName":"/var/lib/postgresql/data/pgdata/pg_wal/<redacted>","startTime":"2026-02-09T00:05:12.472786965Z","endTime":"2026-02-09T00:05:13.313845555Z","elapsedWalTime":0.841058596,"logging_pod":"<redacted>"}
{"level":"info","ts":"2026-02-09T00:06:08.389816639Z","msg":"Skipping retention policy enforcement, no retention policy specified","logging_pod":"<redacted>"}
{"level":"info","ts":"2026-02-09T00:08:37.208953145Z","msg":"Executing barman-cloud-wal-archive","logging_pod":"<redacted>","walName":"/var/lib/postgresql/data/pgdata/pg_wal/<redacted>","options":["--cloud-provider","azure-blob-storage","--credential","managed-identity","https://<redacted>/backup","<redacted>","/var/lib/postgresql/data/pgdata/pg_wal/<redacted>"]}
{"level":"info","ts":"2026-02-09T00:08:37.87194076Z","msg":"Archived WAL file","walName":"/var/lib/postgresql/data/pgdata/pg_wal/<redacted>","startTime":"2026-02-09T00:08:37.208941104Z","endTime":"2026-02-09T00:08:37.871878767Z","elapsedWalTime":0.66293767,"logging_pod":"<redacted>"}
{"level":"info","ts":"2026-02-09T00:08:37.903039304Z","msg":"Executing barman-cloud-wal-archive","logging_pod":"<redacted>","walName":"/var/lib/postgresql/data/pgdata/pg_wal/<redacted>.backup","options":["--cloud-provider","azure-blob-storage","--credential","managed-identity","https://<redacted>/backup","<redacted>","/var/lib/postgresql/data/pgdata/pg_wal/<redacted>.backup"]}
{"level":"info","ts":"2026-02-09T00:08:38.499234327Z","msg":"Archived WAL file","walName":"/var/lib/postgresql/data/pgdata/pg_wal/<redacted>.backup","startTime":"2026-02-09T00:08:37.903030477Z","endTime":"2026-02-09T00:08:38.499195848Z","elapsedWalTime":0.596165375,"logging_pod":"<redacted>"}
{"level":"info","ts":"2026-02-09T00:08:41.759347667Z","msg":"Completed barman-cloud-backup","logging_pod":"<redacted>","options":["--user","postgres","--name","backup-20260209000200","--cloud-provider","azure-blob-storage","--credential","managed-identity","https://<redacted>/backup","<redacted>"]}
{"level":"info","ts":"2026-02-09T00:08:42.46143316Z","msg":"Backup completed","logging_pod":"<redacted>","backup":"20260209T000200"}
{"level":"info","ts":"2026-02-09T00:08:42.461450254Z","msg":"Refreshing the recovery window","logging_pod":"<redacted>","backupName":"backup-20260209000200"}
Summary
Despite upgrading to barman-cloud 0.11.0, the barman-cloud sidecar memory keeps growing during a ScheduledBackup (plugin method) and never shrinks.
Database size: 21.1 GiB.
I saw a similar report here (issue closed):
cloudnative-pg/plugin-barman-cloud#711 (comment)
Environment
Expected behavior
ScheduledBackup completes without unbounded memory growth in the barman-cloud sidecar.
Actual behavior
During ScheduledBackup, the barman-cloud sidecar memory usage keeps increasing over time.
Reproduction
method: plugin.ScheduledBackup manifest
Cluster manifest
StorageClass manifest
Logs from primary instance
{"level":"info","ts":"2026-02-09T00:02:00.654902071Z","msg":"Starting backup","logging_pod":"<redacted>"} {"level":"info","ts":"2026-02-09T00:02:00.67376384Z","msg":"Starting barman-cloud-backup","logging_pod":"<redacted>","options":["--user","postgres","--name","backup-20260209000200","--cloud-provider","azure-blob-storage","--credential","managed-identity","https://<redacted>/backup","<redacted>"]} {"level":"info","ts":"2026-02-09T00:02:01.025849551Z","logger":"barman-cloud-backup","msg":"/venv/lib/python3.13/site-packages/barman/cloud.py:231: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in staticmethod() if you want to preserve the old behavior","pipe":"stderr","logging_pod":"<redacted>"} {"level":"info","ts":"2026-02-09T00:02:01.025866821Z","logger":"barman-cloud-backup","msg":" self.buffer = self._buffer()","pipe":"stderr","logging_pod":"<redacted>"} {"level":"info","ts":"2026-02-09T00:05:12.4727951Z","msg":"Executing barman-cloud-wal-archive","logging_pod":"<redacted>","walName":"/var/lib/postgresql/data/pgdata/pg_wal/<redacted>","options":["--cloud-provider","azure-blob-storage","--credential","managed-identity","https://<redacted>/backup","<redacted>","/var/lib/postgresql/data/pgdata/pg_wal/<redacted>"]} {"level":"info","ts":"2026-02-09T00:05:13.31387298Z","msg":"Archived WAL file","walName":"/var/lib/postgresql/data/pgdata/pg_wal/<redacted>","startTime":"2026-02-09T00:05:12.472786965Z","endTime":"2026-02-09T00:05:13.313845555Z","elapsedWalTime":0.841058596,"logging_pod":"<redacted>"} {"level":"info","ts":"2026-02-09T00:06:08.389816639Z","msg":"Skipping retention policy enforcement, no retention policy specified","logging_pod":"<redacted>"} {"level":"info","ts":"2026-02-09T00:08:37.208953145Z","msg":"Executing barman-cloud-wal-archive","logging_pod":"<redacted>","walName":"/var/lib/postgresql/data/pgdata/pg_wal/<redacted>","options":["--cloud-provider","azure-blob-storage","--credential","managed-identity","https://<redacted>/backup","<redacted>","/var/lib/postgresql/data/pgdata/pg_wal/<redacted>"]} {"level":"info","ts":"2026-02-09T00:08:37.87194076Z","msg":"Archived WAL file","walName":"/var/lib/postgresql/data/pgdata/pg_wal/<redacted>","startTime":"2026-02-09T00:08:37.208941104Z","endTime":"2026-02-09T00:08:37.871878767Z","elapsedWalTime":0.66293767,"logging_pod":"<redacted>"} {"level":"info","ts":"2026-02-09T00:08:37.903039304Z","msg":"Executing barman-cloud-wal-archive","logging_pod":"<redacted>","walName":"/var/lib/postgresql/data/pgdata/pg_wal/<redacted>.backup","options":["--cloud-provider","azure-blob-storage","--credential","managed-identity","https://<redacted>/backup","<redacted>","/var/lib/postgresql/data/pgdata/pg_wal/<redacted>.backup"]} {"level":"info","ts":"2026-02-09T00:08:38.499234327Z","msg":"Archived WAL file","walName":"/var/lib/postgresql/data/pgdata/pg_wal/<redacted>.backup","startTime":"2026-02-09T00:08:37.903030477Z","endTime":"2026-02-09T00:08:38.499195848Z","elapsedWalTime":0.596165375,"logging_pod":"<redacted>"} {"level":"info","ts":"2026-02-09T00:08:41.759347667Z","msg":"Completed barman-cloud-backup","logging_pod":"<redacted>","options":["--user","postgres","--name","backup-20260209000200","--cloud-provider","azure-blob-storage","--credential","managed-identity","https://<redacted>/backup","<redacted>"]} {"level":"info","ts":"2026-02-09T00:08:42.46143316Z","msg":"Backup completed","logging_pod":"<redacted>","backup":"20260209T000200"} {"level":"info","ts":"2026-02-09T00:08:42.461450254Z","msg":"Refreshing the recovery window","logging_pod":"<redacted>","backupName":"backup-20260209000200"}